首次转发成功

This commit is contained in:
2026-04-23 20:50:35 +08:00
parent a1587b8d12
commit 3e6fe3a6a1
20 changed files with 2884 additions and 4 deletions

View File

@@ -150,6 +150,22 @@
- 代码位置:[src/direct-chat.ts:185-187](src/direct-chat.ts#L185-L187)
- 是否必需:否
### `CODEBUDDY_SYSTEM_PROMPT_MODE`
- 作用:控制 direct server 如何处理客户端传入的 system prompt
- 可选值:`original``passthrough``hybrid`
- 默认值:`original`
- 代码位置:[src/direct-config.ts](src/direct-config.ts)、[src/direct-request-builders.ts](src/direct-request-builders.ts)
- 是否必需:否
规则:
- `original`:只使用本地原始 system prompt忽略客户端传入的 system / instructions
- `passthrough`:只透传客户端传入的 system / instructions不注入本地原始 system prompt
- `hybrid`:同时发送两条 system prompt本地原始 system prompt 在前,客户端传入的 system / instructions 在后
默认不会把原始 system prompt 和客户端 system prompt 同时发给上游;只有 `hybrid` 模式会这样做。
### system prompt 注入规则
代码位置:[src/direct-chat.ts:107-109](src/direct-chat.ts#L107-L109)