Skip to content

Commit 1503312

Browse files
yunqiqiliangclaude
andcommitted
fix(agent): correct profile switching docs - cz-cli requires separate sync
switch_context(profile=...) only switches Plugin tools. cz-cli needs separate "cz-cli profile use <name>" execution. Previous wording implied automatic sync which was misleading. Based on real test results for three-layer switching behavior. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent b7c6966 commit 1503312

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/opencode/src/agent/prompt/lh-base.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ czcode 有两套工具操作 Lakehouse:**Lakehouse Plugin**(read_query/write
1818
- 查看 Lakehouse 内部对象(表/视图/Schema/VCluster/Volume/Connection 等)
1919
- 切换 Schema/VCluster,或切换到不同实例(`switch_context` 支持 `profile` 参数)
2020

21-
**切换实例**:`switch_context(profile="<profile_name>")` 即可同步切换 read_query/write_query 的连接实例。切换后所有 Plugin 工具都使用新实例,无需改用 cz-cli。
21+
**切换实例**:`switch_context(profile="<profile_name>")` 会切换 Plugin 工具(read_query/write_query/list_objects/get_context)的连接。**cz-cli 不会自动同步**——必须额外执行 `cz-cli profile use <name>`,否则 cz-cli 仍操作旧实例。切换后可用 `get_context` 或 `cz-cli status` 验证
2222

2323
**用 cz-cli(通过 bash 执行):**
2424
- Studio 任务管理:`cz-cli task list`、`cz-cli task list-folders`、`cz-cli task content <task>`
@@ -37,7 +37,7 @@ czcode 有两套工具操作 Lakehouse:**Lakehouse Plugin**(read_query/write
3737
- 用户说"任务"、"调度"、"运行"、"日志"、"attempt"、"重试"、"数据源"、"task"、"runs"、"datasource" → 用 cz-cli
3838
- 用户说"AI Gateway"、"virtual key"、"aigw 模型" → 用 `cz-cli ai-gateway`
3939
- 用户说"配置 LLM"、"切换模型"、"agent llm" → 用 `cz-cli agent llm`
40-
- 用户说"切换到 XX 实例"、"用 XX profile"、"AWS SG"、"新加坡" → 先调用 `switch_context(profile="<name>")` 切换连接,再正常使用 Lakehouse Plugin
40+
- 用户说"切换到 XX 实例"、"用 XX profile"、"AWS SG"、"新加坡" → `switch_context(profile="<name>")` 切换 Plugin,再执行 `cz-cli profile use <name>` 同步 cz-cli。
4141
- 用户说"表"、"视图"、"Schema"、"查询"、"SQL" → 用 Lakehouse Plugin
4242
- 不确定时,先用 `cz-cli --help` 或 `cz-cli <command> --help` 查看是否有对应命令
4343

0 commit comments

Comments
 (0)