feat: configurable URL opener via open.command_template#70
Merged
Conversation
URLs opened from the conversation URL browser and the URL action menu now go
through a config-driven command template instead of a hardcoded open/xdg-open.
- New internal/opener package mirrors the claudecmd template pattern:
{{url}} placeholder, appends URL when omitted, empty template falls back to
the OS default handler (open on macOS, xdg-open on Linux).
- Export claudecmd.SplitTemplate for reuse by the opener tokenizer.
- Wire open.Config through CCXConfig / LoadCCXConfig / App.Config; the existing
'ccx config set open.command_template ...' CLI works via the generic setter.
- Drop the now-unused extract.OpenInBrowser.
Example: open.command_template: "tmux-chrome open {{url}}"
Kairo-Kim
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
URL을 여는 경로를 하드코딩된
open/xdg-open대신 config로 설정 가능한 command template로 바꿨습니다. 기존claude.command_template({{args}}치환) 패턴을 그대로 미러링했습니다.Usage
config.yaml (
~/.config/ccx/config.yaml):CLI (기존 범용 setter가 그대로 지원):
Behavior
{{url}}이 URL로 치환됩니다.{{url}}을 생략하면 URL이 마지막 인자로 append 됩니다 (예:"firefox --new-tab").open, Linuxxdg-open)으로 폴백합니다.'/opt/my browser/open' {{url}}.적용 범위: URL 액션 메뉴 + conversation URL 브라우저. 파일 경로를 여는
openInEditor는 별도 로직이라 대상 아님.Changes
internal/opener/—opener.go+opener_test.gointernal/claudecmd/claudecmd.go—splitTemplate→SplitTemplateexport (opener 재사용)internal/tui/{state,app,urls,conversation}.go—open.Config배선, 두 호출부를opener.Open으로 교체internal/cli/run_pick.go,main.go—LoadCCXConfig반환값 배선internal/extract/extract.go— 미사용이 된OpenInBrowser및 관련 import 제거README.md— "URL opener" 섹션 추가Test
go build ./...,go vet ./...,go test ./...전부 통과config set→config view) 실제 확인