@burdenoff/fe-libs 2026.908.2 → 2026.909.1
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/dist/shared/assistant/turnState.d.ts +45 -0
- package/dist/shared/assistant/turnState.d.ts.map +1 -1
- package/dist/shared/assistant/turnState.js +10 -1
- package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantChatArea.js +230 -212
- package/dist/shared/assistant/ui/AssistantSpeechProvider.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantSpeechProvider.js +151 -154
- package/dist/shared/assistant/voice/speechPlayback.d.ts +32 -0
- package/dist/shared/assistant/voice/speechPlayback.d.ts.map +1 -1
- package/dist/shared/assistant/voice/speechPlayback.js +7 -1
- package/dist/shared-assistant.js +59 -59
- package/package.json +1 -1
|
@@ -13,6 +13,51 @@ import { AssistantConversationStatus } from './conversation';
|
|
|
13
13
|
* test suite.
|
|
14
14
|
*/
|
|
15
15
|
export declare function isTurnInFlight(status: AssistantConversationStatus | undefined): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Should this turn's own runtime give up, and may it clear the shared state?
|
|
18
|
+
*
|
|
19
|
+
* ★★ Cancelling the model is only half of cancelling a turn. The client-side
|
|
20
|
+
* poll loop that drives a turn keeps running after the abort: it goes on
|
|
21
|
+
* patching the cancelled message with whatever the sandbox produced, and on
|
|
22
|
+
* exit writes `setConversationProcessing(id, 'complete', <its own messageId>)`.
|
|
23
|
+
*
|
|
24
|
+
* That write is the damaging one. `processingByConversationId` holds ONE entry
|
|
25
|
+
* per conversation, so a turn submitted in the meantime already owns it — and
|
|
26
|
+
* the abandoned turn overwrites it with a completion for the answer the user
|
|
27
|
+
* cancelled, leaving the live turn's own completion landing on an entry that no
|
|
28
|
+
* longer describes it. Silently: there is no error on either side.
|
|
29
|
+
*
|
|
30
|
+
* ★ Scope, stated honestly. This does NOT fire in the voice correction flow:
|
|
31
|
+
* the orb is `disabled` while the phase is `thinking`
|
|
32
|
+
* (`ui/voice/AssistantVoiceOrb.tsx`), and `micIsInterrupt` is true only for
|
|
33
|
+
* `speaking` — which is reachable only once the turn is already complete. So no
|
|
34
|
+
* voice turn can be aborted mid-generation today. Where this earns its place is
|
|
35
|
+
* the host-page `pendingPrompt` route, which starts turns past the voice
|
|
36
|
+
* overlay and CAN be aborted while running.
|
|
37
|
+
*
|
|
38
|
+
* ★★ It is therefore NOT what delivers stale-output rejection. Old TEXT
|
|
39
|
+
* reaching a new caption is a separate defect with a separate fix — see
|
|
40
|
+
* `publishedChunks` in `voice/speechPlayback.ts`. Do not conflate them; an
|
|
41
|
+
* earlier version of this comment claimed this guard stopped the cancelled
|
|
42
|
+
* answer being read aloud, and that was never reachable.
|
|
43
|
+
*
|
|
44
|
+
* ★ `clearProcessing` is addressed the same way `planTurnAbort` is. An
|
|
45
|
+
* abandoned turn may clear the shared entry only while that entry is still its
|
|
46
|
+
* own — otherwise it would strand the very answer the user is now waiting for.
|
|
47
|
+
* When nothing replaced it, clearing is what stops the composer sitting
|
|
48
|
+
* disabled forever behind a turn that will never complete.
|
|
49
|
+
*/
|
|
50
|
+
export declare function planAbandonedTurn(args: {
|
|
51
|
+
/** The message id this runtime is driving. */
|
|
52
|
+
turnId: string;
|
|
53
|
+
/** A cancellation has been requested for it. */
|
|
54
|
+
abortRequested: boolean;
|
|
55
|
+
/** The turn the shared processing entry currently describes. */
|
|
56
|
+
activeTurnId: string | null | undefined;
|
|
57
|
+
}): {
|
|
58
|
+
abandon: boolean;
|
|
59
|
+
clearProcessing: boolean;
|
|
60
|
+
};
|
|
16
61
|
/** Why an abort was or was not sent. Carried so callers can log the near-miss. */
|
|
17
62
|
export type TurnAbortReason = "send" | "nothing-running" | "superseded" | "already-requested";
|
|
18
63
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turnState.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/turnState.ts"],"names":[],"mapp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M,eAAe,GACvB,MAAM,GACN,iBAAiB,GACjB,YAAY,GACZ,mBAAmB,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAClC,yCAAyC;IACzC,iBAAiB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC7C,iEAAiE;IACjE,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,CAkB7C"}
|
|
@@ -3,6 +3,15 @@ function e(e) {
|
|
|
3
3
|
return e === "provisioning" || e === "connecting" || e === "streaming";
|
|
4
4
|
}
|
|
5
5
|
function t(e) {
|
|
6
|
+
return e.abortRequested ? {
|
|
7
|
+
abandon: !0,
|
|
8
|
+
clearProcessing: e.activeTurnId === e.turnId
|
|
9
|
+
} : {
|
|
10
|
+
abandon: !1,
|
|
11
|
+
clearProcessing: !1
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function n(e) {
|
|
6
15
|
let { interruptedTurnId: t, activeTurnId: n, alreadyRequested: r = !1 } = e;
|
|
7
16
|
return !t || !n ? {
|
|
8
17
|
send: !1,
|
|
@@ -19,4 +28,4 @@ function t(e) {
|
|
|
19
28
|
};
|
|
20
29
|
}
|
|
21
30
|
//#endregion
|
|
22
|
-
export { e as isTurnInFlight, t as planTurnAbort };
|
|
31
|
+
export { e as isTurnInFlight, t as planAbandonedTurn, n as planTurnAbort };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantChatArea.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantChatArea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AssistantChatArea.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/ui/AssistantChatArea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AAyEf,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAoLvE;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC;CACpC;AAED,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAm0DxD,CAAC"}
|