Open
Conversation
When SandboxRouter has docker enabled, inject a built-in docker sandbox entry (named __docker__) into the runner list so users can see and switch to it from both the web UI and Feishu settings card. Changes: - tools/sandbox_router.go: add HasDocker(), DockerImage(), SetTokenStore(); SandboxForUser now reads user_settings.active_runner to respect user choice - tools/docker_sandbox.go: add Image() method - tools/sandbox_runner.go: SetRunnerTokenDB also sets router's tokenStore - main.go: RunnerList callback injects docker entry when router has docker - channel/web_api.go: reject DELETE for built-in docker sandbox - channel/feishu_settings.go: show docker as 'Docker Sandbox (内置)', hide delete button, guard against deletion - web/src/components/RunnerPanel.tsx: special handling for __docker__ (no delete, no connect command, always online)
- Add channel/cli.go: CLI Channel implementation with Bubble Tea TUI - Add cmd/cli/main.go: Standalone CLI entry point - Add channel/card_converter.go: Shared Feishu Card converter - Add docs/cli-channel.md: User documentation - Update go.mod: Add Bubble Tea, Lipgloss, Glamour dependencies - Add bus.IsPartial field for streaming support - Update channel/web.go to use shared card converter - Update README.md with CLI Channel usage Features: - Real-time streaming output with progress indicators - Markdown rendering with syntax highlighting - Multi-line input with keyboard shortcuts - Tool progress and SubAgent status display - Graceful shutdown handling - Window resize support Testing: - 67 test cases with 91.38% coverage - All CI checks passed (Build/Lint/Test) Co-authored-by: xbot <xbot@example.com>
glamour.WithAutoStyle() queries terminal background color via OSC 11,
the response (e.g. ]11;rgb:1e1e/1e1e/1e1e\) leaks into textarea stdin
and gets displayed as garbled text.
Fix:
- Replace glamour.WithAutoStyle() with glamour.WithStandardStyle("dark")
- Clear textarea in Init() to absorb any residual OSC responses
termenv.DefaultOutput() queries terminal background color by sending
OSC 11 (\x1b]11;?\x1b\). The terminal response leaks into textarea
stdin and displays as garbled text (e.g. ]11;rgb:1e1e/1e1e/1e1e\).
Fix: Set termenv default output with WithTTY(false) in init() to
prevent any terminal queries. Combined with previous fix:
- glamour.WithStandardStyle("dark") instead of WithAutoStyle()
- textarea.Reset() in Init() as safety net
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.
功能概述
为 xbot 添加 CLI Channel,- 支持 TUI 交互式终端界面
核心特性
技术栈
测试
使用方式
文档
详细使用文档见:
docs/cli-channel.md变更文件
新增:
channel/cli.go- CLI Channel 核心实现channel/cli_test.go- 单元测试channel/card_converter.go- Feishu Card 转换器cmd/cli/main.go- CLI 独立入口docs/cli-channel.md- 用户文档修改:
go.mod- 添加 Bubble Tea 等依赖bus/bus.go- 添加 IsPartial 字段channel/web.go- 使用共享 Card 转换器README.md- 添加 CLI Channel 说明Co-authored-by: xbot xbot@example.com