@7n/tauri-components 0.13.6 → 0.13.8
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/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/src/components/AgentDialog.vue +12 -2
- package/src/components/docs/AgentDialog.md +1 -1
- package/src/core/acp-kit.js +29 -12
- package/src/core/docs/acp-kit.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.13.8] - 2026-07-20
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- AgentDialog: дайджест контексту при перемиканні агента тепер явно позначає репліки попереднього агента як чужі — раніше модель могла на ідентифікаційне питання ('що ти за модель') відповісти самоописом попереднього агента, побачивши його 'Я — Codex...' у контексті
|
|
8
|
+
|
|
9
|
+
## [0.13.7] - 2026-07-20
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- acp_spawn_agent тепер чекає на реальний успіх/провал initialize+session/new перед поверненням session key (усуває гонку з acp_prompt, яка проявлялась як незрозуміла 'dropped the reply channel'); request() у acp-kit.js журналить провал спавну сесії як 'failed' замість непійманого throw
|
|
14
|
+
|
|
3
15
|
## [0.13.6] - 2026-07-20
|
|
4
16
|
|
|
5
17
|
### Changed
|
package/package.json
CHANGED
|
@@ -164,9 +164,19 @@ function handoffContext() {
|
|
|
164
164
|
const lines = relevant.map(turn =>
|
|
165
165
|
turn.role === 'user'
|
|
166
166
|
? `Користувач: ${turn.text}`
|
|
167
|
-
:
|
|
167
|
+
: `Попередній агент (${turn.agentLabel}): ${turn.result?.summary ?? turn.result?.question ?? ''}`
|
|
168
|
+
)
|
|
169
|
+
// Models tend to latch onto identity-shaped text in context (e.g. a prior
|
|
170
|
+
// "Я — Codex…" line) and echo it as their own self-description when asked
|
|
171
|
+
// who they are — so this must say outright that the quoted lines belong to
|
|
172
|
+
// someone else, not describe the model now answering.
|
|
173
|
+
return (
|
|
174
|
+
'СИСТЕМНА ПРИМІТКА: нижче — лог розмови користувача з ІНШИМ агентом, ' +
|
|
175
|
+
'якого щойно замінили на тебе. Це чужі репліки, наведені лише для ' +
|
|
176
|
+
'контексту розмови — вони НЕ описують тебе, і якщо там є самоопис ' +
|
|
177
|
+
'іншого агента, не повторюй і не наслідуй його. На нове повідомлення ' +
|
|
178
|
+
`відповідай як ти сам.\n\n${lines.join('\n')}\n\nНове повідомлення:\n`
|
|
168
179
|
)
|
|
169
|
-
return `Контекст попередньої розмови (продовжуєш замість іншого агента):\n${lines.join('\n')}\n\nНове повідомлення:\n`
|
|
170
180
|
}
|
|
171
181
|
|
|
172
182
|
/**
|
package/src/core/acp-kit.js
CHANGED
|
@@ -125,6 +125,28 @@ export function createAcpAgentKit({
|
|
|
125
125
|
await deps.onAcpPermissionRequest(handlePermissionRequest)
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
/**
|
|
129
|
+
* Journal a request as failed and return its structured result envelope —
|
|
130
|
+
* shared by a session that never spawned and a turn that errored mid-flight.
|
|
131
|
+
* @param {string} requestId journal record id
|
|
132
|
+
* @param {object[]} baseActions actions already recorded for this request
|
|
133
|
+
* @param {unknown} error the thrown/rejected value
|
|
134
|
+
* @returns {Promise<object>} structured result envelope
|
|
135
|
+
*/
|
|
136
|
+
async function failedResult(requestId, baseActions, error) {
|
|
137
|
+
const message = String(error?.message ?? error)
|
|
138
|
+
await journal.update(requestId, { status: 'failed', error: message })
|
|
139
|
+
return {
|
|
140
|
+
requestId,
|
|
141
|
+
status: 'failed',
|
|
142
|
+
summary: null,
|
|
143
|
+
error: message,
|
|
144
|
+
actions: baseActions,
|
|
145
|
+
question: null,
|
|
146
|
+
pendingApproval: null
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
128
150
|
/**
|
|
129
151
|
* Run one turn, journal the result, and reset `pendingApproval`. Callers
|
|
130
152
|
* must set `activeRequestId` themselves *before* starting the turn — a
|
|
@@ -141,17 +163,7 @@ export function createAcpAgentKit({
|
|
|
141
163
|
try {
|
|
142
164
|
turn = await turnPromise
|
|
143
165
|
} catch (error) {
|
|
144
|
-
|
|
145
|
-
await journal.update(requestId, { status: 'failed', error: message })
|
|
146
|
-
return {
|
|
147
|
-
requestId,
|
|
148
|
-
status: 'failed',
|
|
149
|
-
summary: null,
|
|
150
|
-
error: message,
|
|
151
|
-
actions: baseActions,
|
|
152
|
-
question: null,
|
|
153
|
-
pendingApproval: null
|
|
154
|
-
}
|
|
166
|
+
return failedResult(requestId, baseActions, error)
|
|
155
167
|
}
|
|
156
168
|
const fields = finalizeTurn(turn)
|
|
157
169
|
const actions = [...baseActions, ...turn.trace]
|
|
@@ -170,7 +182,12 @@ export function createAcpAgentKit({
|
|
|
170
182
|
await ensureListening()
|
|
171
183
|
const id = await journal.create({ intent, actor: AGENT_ACTOR })
|
|
172
184
|
await journal.update(id, { status: 'running' })
|
|
173
|
-
|
|
185
|
+
let session
|
|
186
|
+
try {
|
|
187
|
+
session = await deps.createAcpSession(agent)
|
|
188
|
+
} catch (error) {
|
|
189
|
+
return failedResult(id, [], error)
|
|
190
|
+
}
|
|
174
191
|
activeSessionKey = session.sessionKey
|
|
175
192
|
activeRequestId = id
|
|
176
193
|
await journal.update(id, { acp: { agentKind: session.agentKind, sessionKey: session.sessionKey } })
|