@burdenoff/fe-libs 2026.908.2 → 2026.909.2
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 +46 -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 +232 -213
- package/dist/shared/assistant/ui/AssistantSpeechProvider.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantSpeechProvider.js +151 -154
- package/dist/shared/assistant/ui/voice/AssistantVoiceOrb.d.ts +1 -1
- package/dist/shared/assistant/ui/voice/AssistantVoiceOrb.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/AssistantVoiceOrb.js +2 -2
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +67 -67
- 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/voice/voiceSession.d.ts.map +1 -1
- package/dist/shared/assistant/voice/voiceSession.js +1 -1
- package/dist/shared/assistant/voice/voiceStageState.d.ts +16 -1
- package/dist/shared/assistant/voice/voiceStageState.d.ts.map +1 -1
- package/dist/shared/assistant/voice/voiceStageState.js +1 -1
- package/dist/shared-assistant.js +59 -59
- package/package.json +1 -1
|
@@ -13,6 +13,52 @@ 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. This now fires in the VOICE flow: the orb is pressable during
|
|
31
|
+
* `thinking` and `micIsInterrupt` covers it, so a user can cut off an answer
|
|
32
|
+
* while it is still being generated. It also covers the host-page
|
|
33
|
+
* `pendingPrompt` route, which starts turns past the voice overlay.
|
|
34
|
+
*
|
|
35
|
+
* Two earlier versions of this comment were wrong in opposite directions, which
|
|
36
|
+
* is why the scope is now stated rather than assumed. The first claimed this
|
|
37
|
+
* guard stopped the cancelled answer being read aloud — it never could. The
|
|
38
|
+
* second said it could not fire from voice at all — true only while the orb was
|
|
39
|
+
* inert during `thinking`, which was the very thing this work removed.
|
|
40
|
+
*
|
|
41
|
+
* ★★ It is still NOT what delivers stale-output rejection. Old TEXT reaching a
|
|
42
|
+
* new caption is a separate defect with a separate fix — see `publishedChunks`
|
|
43
|
+
* in `voice/speechPlayback.ts`. Do not conflate them.
|
|
44
|
+
*
|
|
45
|
+
* ★ `clearProcessing` is addressed the same way `planTurnAbort` is. An
|
|
46
|
+
* abandoned turn may clear the shared entry only while that entry is still its
|
|
47
|
+
* own — otherwise it would strand the very answer the user is now waiting for.
|
|
48
|
+
* When nothing replaced it, clearing is what stops the composer sitting
|
|
49
|
+
* disabled forever behind a turn that will never complete.
|
|
50
|
+
*/
|
|
51
|
+
export declare function planAbandonedTurn(args: {
|
|
52
|
+
/** The message id this runtime is driving. */
|
|
53
|
+
turnId: string;
|
|
54
|
+
/** A cancellation has been requested for it. */
|
|
55
|
+
abortRequested: boolean;
|
|
56
|
+
/** The turn the shared processing entry currently describes. */
|
|
57
|
+
activeTurnId: string | null | undefined;
|
|
58
|
+
}): {
|
|
59
|
+
abandon: boolean;
|
|
60
|
+
clearProcessing: boolean;
|
|
61
|
+
};
|
|
16
62
|
/** Why an abort was or was not sent. Carried so callers can log the near-miss. */
|
|
17
63
|
export type TurnAbortReason = "send" | "nothing-running" | "superseded" | "already-requested";
|
|
18
64
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turnState.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/turnState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAElE;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,2BAA2B,GAAG,SAAS,GAC9C,OAAO,CAMT;AAED,kFAAkF;AAClF,MAAM,MAAM,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"}
|
|
1
|
+
{"version":3,"file":"turnState.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/turnState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAElE;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,2BAA2B,GAAG,SAAS,GAC9C,OAAO,CAMT;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IACtC,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,cAAc,EAAE,OAAO,CAAC;IACxB,gEAAgE;IAChE,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACzC,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,eAAe,EAAE,OAAO,CAAA;CAAE,CAGjD;AAED,kFAAkF;AAClF,MAAM,MAAM,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,CAk1DxD,CAAC"}
|