@cjhyy/code-shell-web 0.9.41 → 0.9.43
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.
|
@@ -93,6 +93,15 @@ export interface ChatState {
|
|
|
93
93
|
}>;
|
|
94
94
|
}
|
|
95
95
|
export declare function initialChatState(): ChatState;
|
|
96
|
+
/**
|
|
97
|
+
* Map a core TerminalReason (types.ts) to a phone run-state. Only genuine
|
|
98
|
+
* failures (prompt_too_long / model_error / image_error) are "error"; budget/
|
|
99
|
+
* turn/hook limits are EXPECTED stops and must not flash a red error on the
|
|
100
|
+
* StatusBar. Aborts (user-initiated) drop back to idle. Unknown future reasons
|
|
101
|
+
* default to "completed" rather than "error" — a stop we don't recognize is
|
|
102
|
+
* still a stop, and mislabeling it a failure is the worse default.
|
|
103
|
+
*/
|
|
104
|
+
export declare function runStateForReason(reason: string): RunState;
|
|
96
105
|
export declare function reduceStream(state: ChatState, raw: unknown): ChatState;
|
|
97
106
|
/** Append a local user echo (the phone shows its own message immediately). */
|
|
98
107
|
export declare function appendUserMessage(state: ChatState, text: string, attachments?: UserAttachmentSummary[], clientMessageId?: string): ChatState;
|
|
@@ -46,7 +46,7 @@ function staleGoalEvent(state, event, allowLegacyIdentityUpgrade = false) {
|
|
|
46
46
|
* default to "completed" rather than "error" — a stop we don't recognize is
|
|
47
47
|
* still a stop, and mislabeling it a failure is the worse default.
|
|
48
48
|
*/
|
|
49
|
-
function runStateForReason(reason) {
|
|
49
|
+
export function runStateForReason(reason) {
|
|
50
50
|
switch (reason) {
|
|
51
51
|
case "aborted_streaming":
|
|
52
52
|
case "aborted_tools":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cjhyy/code-shell-web",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.43",
|
|
4
4
|
"description": "CodeShell web client logic layer — remote-app state (chatReducer + server-event fold), reconnecting WebSocket hook, pairing/device-credential/risk helpers, and the mobile i18n namespace. Browser-only (no Electron, no Node); seed of the standalone browser client.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true});require('node:fs').rmSync('dist-app',{recursive:true,force:true})\""
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@cjhyy/code-shell-core": "0.9.
|
|
28
|
-
"@cjhyy/code-shell-link": "0.9.
|
|
27
|
+
"@cjhyy/code-shell-core": "0.9.43",
|
|
28
|
+
"@cjhyy/code-shell-link": "0.9.43",
|
|
29
29
|
"@types/react": "^19.2.14",
|
|
30
30
|
"qrcode": "1.5.4"
|
|
31
31
|
},
|