@allbluecn/web-app 0.27.33 → 0.27.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -112,7 +112,7 @@ export const SDK_GROUPS: SdkGroup[] = [
|
|
|
112
112
|
"items": [
|
|
113
113
|
{
|
|
114
114
|
"name": "@allbluecn/web-app",
|
|
115
|
-
"version": "v0.27.
|
|
115
|
+
"version": "v0.27.34",
|
|
116
116
|
"lastUpdate": "Nov 10, 2026",
|
|
117
117
|
"source": "apps/web/package.json",
|
|
118
118
|
"docsUrl": "https://github.com/allbluecn/allblue"
|
|
@@ -545,6 +545,12 @@ export async function* handleChatRequest(
|
|
|
545
545
|
localCwd: cwd,
|
|
546
546
|
localAgentId: effectiveLocalAgentId,
|
|
547
547
|
localAgentModel,
|
|
548
|
+
// harnessKind agent 的 persona 随 prompt 文本注入桌面 ACP(ACP 无 system
|
|
549
|
+
// 槽,persona 只能进 prompt turn)。仅 harnessKind 激活时携带——内置 CLI
|
|
550
|
+
// 无 persona,行为不变。
|
|
551
|
+
...(harnessKindActive && options?.overrides?.agent?.persona
|
|
552
|
+
? { localSystemPrompt: options.overrides.agent.persona }
|
|
553
|
+
: {}),
|
|
548
554
|
aiSourceMode: session.user.aiSourceMode ?? null,
|
|
549
555
|
},
|
|
550
556
|
request,
|
|
@@ -110,6 +110,11 @@ interface BuildChatStreamParams {
|
|
|
110
110
|
localAgentId?: string
|
|
111
111
|
/** 本地模型选择(ACP configOptions 值 / modes id) */
|
|
112
112
|
localAgentModel?: string
|
|
113
|
+
/**
|
|
114
|
+
* 本地 agent 的 persona(system prompt)。harnessKind agent 经桌面 ACP 执行时
|
|
115
|
+
* 随 prompt 文本注入(ACP 无 system 槽)。仅 harnessKind 激活时由 chat-handler 传入。
|
|
116
|
+
*/
|
|
117
|
+
localSystemPrompt?: string
|
|
113
118
|
}
|
|
114
119
|
|
|
115
120
|
/**
|
|
@@ -173,6 +178,10 @@ export async function buildChatStreamWithTools(
|
|
|
173
178
|
sessionId: localThreadId,
|
|
174
179
|
...(params.localAgentId !== undefined ? { agentId: params.localAgentId } : {}),
|
|
175
180
|
...(params.localAgentModel !== undefined ? { agentModel: params.localAgentModel } : {}),
|
|
181
|
+
// harnessKind agent 的 persona:随 prompt 文本注入桌面 ACP(ACP 无 system 槽)。
|
|
182
|
+
...(params.localSystemPrompt !== undefined
|
|
183
|
+
? { systemPrompt: params.localSystemPrompt }
|
|
184
|
+
: {}),
|
|
176
185
|
},
|
|
177
186
|
// 本地 agent 自带 agent loop:单次 adapter 调用即完整运行,禁止引擎再发起模型轮次
|
|
178
187
|
agentLoopStrategy: maxIterations(1),
|
|
@@ -56,6 +56,11 @@ export interface LocalAgentRunInput {
|
|
|
56
56
|
agentId?: string
|
|
57
57
|
/** ACP 模型选择(configOptions 值 / modes id) */
|
|
58
58
|
modelId?: string
|
|
59
|
+
/**
|
|
60
|
+
* persona(system prompt)。harnessKind agent 经桌面 ACP 执行时随 prompt 文本
|
|
61
|
+
* 注入(ACP 无 system 槽)。仅 harnessKind agent 携带;内置 CLI 不传(行为不变)。
|
|
62
|
+
*/
|
|
63
|
+
systemPrompt?: string
|
|
59
64
|
signal?: AbortSignal
|
|
60
65
|
}
|
|
61
66
|
|
|
@@ -134,7 +139,7 @@ export class LocalAgentAdapter {
|
|
|
134
139
|
return
|
|
135
140
|
}
|
|
136
141
|
|
|
137
|
-
const modelOptions = options.modelOptions as { cwd?: unknown; agentId?: unknown; agentModel?: unknown } | undefined
|
|
142
|
+
const modelOptions = options.modelOptions as { cwd?: unknown; agentId?: unknown; agentModel?: unknown; systemPrompt?: unknown } | undefined
|
|
138
143
|
const cwd = typeof modelOptions?.cwd === 'string' ? modelOptions.cwd : ''
|
|
139
144
|
if (cwd === '') {
|
|
140
145
|
yield this.errorEvent('本地 Agent 缺少工作目录(cwd)')
|
|
@@ -142,6 +147,8 @@ export class LocalAgentAdapter {
|
|
|
142
147
|
}
|
|
143
148
|
const agentId = typeof modelOptions?.agentId === 'string' && modelOptions.agentId !== '' ? modelOptions.agentId : undefined
|
|
144
149
|
const modelId = typeof modelOptions?.agentModel === 'string' && modelOptions.agentModel !== '' ? modelOptions.agentModel : undefined
|
|
150
|
+
// harnessKind agent 的 persona(system prompt):随 prompt 文本注入桌面 ACP。
|
|
151
|
+
const systemPrompt = typeof modelOptions?.systemPrompt === 'string' && modelOptions.systemPrompt !== '' ? modelOptions.systemPrompt : undefined
|
|
145
152
|
|
|
146
153
|
const prompt = extractLastUserText(options.messages)
|
|
147
154
|
if (prompt === '') {
|
|
@@ -165,6 +172,7 @@ export class LocalAgentAdapter {
|
|
|
165
172
|
runId,
|
|
166
173
|
...(agentId !== undefined ? { agentId } : {}),
|
|
167
174
|
...(modelId !== undefined ? { modelId } : {}),
|
|
175
|
+
...(systemPrompt !== undefined ? { systemPrompt } : {}),
|
|
168
176
|
signal: abort.signal,
|
|
169
177
|
})) {
|
|
170
178
|
const event = normalizeEvent(raw, this.model, options.threadId, runId)
|
|
@@ -86,6 +86,12 @@ export interface UnifiedAiRequest {
|
|
|
86
86
|
localAgentId?: string
|
|
87
87
|
/** 本地模型选择(ACP configOptions 值 / modes id) */
|
|
88
88
|
localAgentModel?: string
|
|
89
|
+
/**
|
|
90
|
+
* 本地 agent 的 persona(system prompt)。harnessKind agent(带自定义 persona 的
|
|
91
|
+
* UserAgent)经桌面 ACP 通道执行时,persona 随 prompt 文本注入(ACP 无 system 槽)。
|
|
92
|
+
* 仅 harnessKind 激活时由 chat-handler 注入;内置 CLI 不传(行为不变)。
|
|
93
|
+
*/
|
|
94
|
+
localSystemPrompt?: string
|
|
89
95
|
}
|
|
90
96
|
|
|
91
97
|
export type UnifiedAiStream = AsyncIterable<StreamChunk>
|