@khorsheed/dsh-local-agent-claude-code 0.2.1 → 0.2.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/CHANGELOG.md +4 -0
- package/lib/client.js +60 -60
- package/lib/index.js +2 -1
- package/lib/types/claude-cli-provider.d.ts +2 -0
- package/lib/types/claude-cli-provider.js +6 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/lib/client.js
CHANGED
|
@@ -345,30 +345,30 @@ window.__ModuleLoader__.load({
|
|
|
345
345
|
document.head.appendChild(tag);
|
|
346
346
|
}
|
|
347
347
|
var ProviderAuthBlock_module_css_default = {
|
|
348
|
-
"
|
|
348
|
+
"rowTag": "On5p7W_rowTag",
|
|
349
|
+
"rowCard": "On5p7W_rowCard",
|
|
350
|
+
"intro": "On5p7W_intro",
|
|
349
351
|
"title": "On5p7W_title",
|
|
350
|
-
"
|
|
351
|
-
"
|
|
352
|
-
"
|
|
352
|
+
"rowIdentity": "On5p7W_rowIdentity",
|
|
353
|
+
"status": "On5p7W_status",
|
|
354
|
+
"loginPrompt": "On5p7W_loginPrompt",
|
|
353
355
|
"codeInput": "On5p7W_codeInput",
|
|
354
|
-
"
|
|
355
|
-
"
|
|
356
|
+
"retryButton": "On5p7W_retryButton",
|
|
357
|
+
"dotPending": "On5p7W_dotPending",
|
|
358
|
+
"credentialDot": "On5p7W_credentialDot",
|
|
356
359
|
"dotOn": "On5p7W_dotOn",
|
|
357
|
-
"
|
|
360
|
+
"rowName": "On5p7W_rowName",
|
|
361
|
+
"rowActions": "On5p7W_rowActions",
|
|
362
|
+
"rowPending": "On5p7W_rowPending",
|
|
363
|
+
"dotOff": "On5p7W_dotOff",
|
|
364
|
+
"logoutButton": "On5p7W_logoutButton",
|
|
358
365
|
"section": "On5p7W_section",
|
|
366
|
+
"openPage": "On5p7W_openPage",
|
|
367
|
+
"rowHead": "On5p7W_rowHead",
|
|
359
368
|
"rows": "On5p7W_rows",
|
|
360
|
-
"rowTag": "On5p7W_rowTag",
|
|
361
|
-
"logoutButton": "On5p7W_logoutButton",
|
|
362
|
-
"retryButton": "On5p7W_retryButton",
|
|
363
|
-
"credentialDot": "On5p7W_credentialDot",
|
|
364
|
-
"status": "On5p7W_status",
|
|
365
|
-
"rowIdentity": "On5p7W_rowIdentity",
|
|
366
|
-
"rowCard": "On5p7W_rowCard",
|
|
367
|
-
"dotPending": "On5p7W_dotPending",
|
|
368
369
|
"loginButton": "On5p7W_loginButton",
|
|
369
370
|
"rosterError": "On5p7W_rosterError",
|
|
370
|
-
"
|
|
371
|
-
"rowHead": "On5p7W_rowHead"
|
|
371
|
+
"promptText": "On5p7W_promptText"
|
|
372
372
|
};
|
|
373
373
|
//#endregion
|
|
374
374
|
//#region ../local-agent/src/client/ProviderAuthBlock.tsx
|
|
@@ -648,9 +648,9 @@ window.__ModuleLoader__.load({
|
|
|
648
648
|
}
|
|
649
649
|
var AuthStatusDot_module_css_default = {
|
|
650
650
|
"credentialDot": "OFjNUG_credentialDot",
|
|
651
|
-
"
|
|
651
|
+
"dotPending": "OFjNUG_dotPending",
|
|
652
652
|
"dotOff": "OFjNUG_dotOff",
|
|
653
|
-
"
|
|
653
|
+
"dotOn": "OFjNUG_dotOn"
|
|
654
654
|
};
|
|
655
655
|
//#endregion
|
|
656
656
|
//#region ../local-agent/src/client/AuthStatusDot.tsx
|
|
@@ -676,39 +676,39 @@ window.__ModuleLoader__.load({
|
|
|
676
676
|
document.head.appendChild(tag);
|
|
677
677
|
}
|
|
678
678
|
var ModelListSection_module_css_default = {
|
|
679
|
-
"
|
|
680
|
-
"hint": "_4eeJ7W_hint",
|
|
679
|
+
"saved": "_4eeJ7W_saved",
|
|
681
680
|
"modelDelete": "_4eeJ7W_modelDelete",
|
|
682
|
-
"
|
|
681
|
+
"dialogItem": "_4eeJ7W_dialogItem",
|
|
683
682
|
"modelList": "_4eeJ7W_modelList",
|
|
684
|
-
"
|
|
685
|
-
"dialogClose": "_4eeJ7W_dialogClose",
|
|
683
|
+
"modelDefaultChip": "_4eeJ7W_modelDefaultChip",
|
|
686
684
|
"modelRowLabel": "_4eeJ7W_modelRowLabel",
|
|
687
685
|
"dialogItemValue": "_4eeJ7W_dialogItemValue",
|
|
688
|
-
"modelSave": "_4eeJ7W_modelSave",
|
|
689
|
-
"dialogItemLabel": "_4eeJ7W_dialogItemLabel",
|
|
690
686
|
"info": "_4eeJ7W_info",
|
|
691
|
-
"
|
|
692
|
-
"
|
|
693
|
-
"
|
|
694
|
-
"modelAdd": "_4eeJ7W_modelAdd",
|
|
687
|
+
"dialogBackdrop": "_4eeJ7W_dialogBackdrop",
|
|
688
|
+
"dialogList": "_4eeJ7W_dialogList",
|
|
689
|
+
"modelRowValue": "_4eeJ7W_modelRowValue",
|
|
695
690
|
"dialogHead": "_4eeJ7W_dialogHead",
|
|
691
|
+
"dialogActions": "_4eeJ7W_dialogActions",
|
|
692
|
+
"dialogItemAdded": "_4eeJ7W_dialogItemAdded",
|
|
693
|
+
"dialogSelectAll": "_4eeJ7W_dialogSelectAll",
|
|
696
694
|
"dialogTitle": "_4eeJ7W_dialogTitle",
|
|
697
|
-
"block": "_4eeJ7W_block",
|
|
698
|
-
"dialogToolbar": "_4eeJ7W_dialogToolbar",
|
|
699
|
-
"dialog": "_4eeJ7W_dialog",
|
|
700
695
|
"modelDrag": "_4eeJ7W_modelDrag",
|
|
696
|
+
"dialogHint": "_4eeJ7W_dialogHint",
|
|
697
|
+
"blockTitle": "_4eeJ7W_blockTitle",
|
|
698
|
+
"row": "_4eeJ7W_row",
|
|
701
699
|
"errorText": "_4eeJ7W_errorText",
|
|
702
|
-
"dialogActions": "_4eeJ7W_dialogActions",
|
|
703
|
-
"modelRow": "_4eeJ7W_modelRow",
|
|
704
|
-
"modelDefaultChip": "_4eeJ7W_modelDefaultChip",
|
|
705
700
|
"modelInput": "_4eeJ7W_modelInput",
|
|
701
|
+
"hint": "_4eeJ7W_hint",
|
|
702
|
+
"modelSave": "_4eeJ7W_modelSave",
|
|
703
|
+
"modelRowDragging": "_4eeJ7W_modelRowDragging",
|
|
704
|
+
"modelAdd": "_4eeJ7W_modelAdd",
|
|
705
|
+
"modelRow": "_4eeJ7W_modelRow",
|
|
706
706
|
"dialogConfirm": "_4eeJ7W_dialogConfirm",
|
|
707
|
-
"
|
|
708
|
-
"
|
|
709
|
-
"
|
|
710
|
-
"
|
|
711
|
-
"
|
|
707
|
+
"block": "_4eeJ7W_block",
|
|
708
|
+
"dialog": "_4eeJ7W_dialog",
|
|
709
|
+
"dialogToolbar": "_4eeJ7W_dialogToolbar",
|
|
710
|
+
"dialogItemLabel": "_4eeJ7W_dialogItemLabel",
|
|
711
|
+
"dialogClose": "_4eeJ7W_dialogClose"
|
|
712
712
|
};
|
|
713
713
|
//#endregion
|
|
714
714
|
//#region ../local-agent/src/client/ModelListSection.tsx
|
|
@@ -1080,33 +1080,33 @@ window.__ModuleLoader__.load({
|
|
|
1080
1080
|
document.head.appendChild(tag);
|
|
1081
1081
|
}
|
|
1082
1082
|
var SettingsCard_module_css_default = {
|
|
1083
|
-
"nameRow": "C-VWHa_nameRow",
|
|
1084
|
-
"endpointLabel": "C-VWHa_endpointLabel",
|
|
1085
|
-
"card": "C-VWHa_card",
|
|
1086
|
-
"switch": "C-VWHa_switch",
|
|
1087
|
-
"switchOn": "C-VWHa_switchOn",
|
|
1088
|
-
"saved": "C-VWHa_saved",
|
|
1089
|
-
"modelSave": "C-VWHa_modelSave",
|
|
1090
1083
|
"endpointFields": "C-VWHa_endpointFields",
|
|
1091
|
-
"cardOpen": "C-VWHa_cardOpen",
|
|
1092
|
-
"header": "C-VWHa_header",
|
|
1093
|
-
"name": "C-VWHa_name",
|
|
1094
|
-
"endpointField": "C-VWHa_endpointField",
|
|
1095
|
-
"chevronOpen": "C-VWHa_chevronOpen",
|
|
1096
|
-
"rowLabel": "C-VWHa_rowLabel",
|
|
1097
1084
|
"modelInput": "C-VWHa_modelInput",
|
|
1098
|
-
"errorText": "C-VWHa_errorText",
|
|
1099
|
-
"blockTitle": "C-VWHa_blockTitle",
|
|
1100
|
-
"info": "C-VWHa_info",
|
|
1101
|
-
"chevron": "C-VWHa_chevron",
|
|
1102
1085
|
"hint": "C-VWHa_hint",
|
|
1086
|
+
"switch": "C-VWHa_switch",
|
|
1087
|
+
"nameRow": "C-VWHa_nameRow",
|
|
1103
1088
|
"row": "C-VWHa_row",
|
|
1104
1089
|
"headText": "C-VWHa_headText",
|
|
1105
|
-
"
|
|
1090
|
+
"info": "C-VWHa_info",
|
|
1091
|
+
"knob": "C-VWHa_knob",
|
|
1092
|
+
"modelSave": "C-VWHa_modelSave",
|
|
1093
|
+
"errorText": "C-VWHa_errorText",
|
|
1094
|
+
"blockTitle": "C-VWHa_blockTitle",
|
|
1106
1095
|
"body": "C-VWHa_body",
|
|
1096
|
+
"description": "C-VWHa_description",
|
|
1097
|
+
"saved": "C-VWHa_saved",
|
|
1098
|
+
"card": "C-VWHa_card",
|
|
1099
|
+
"chevronOpen": "C-VWHa_chevronOpen",
|
|
1100
|
+
"endpointField": "C-VWHa_endpointField",
|
|
1101
|
+
"endpointLabel": "C-VWHa_endpointLabel",
|
|
1102
|
+
"cardOpen": "C-VWHa_cardOpen",
|
|
1107
1103
|
"block": "C-VWHa_block",
|
|
1108
1104
|
"configuredChip": "C-VWHa_configuredChip",
|
|
1109
|
-
"
|
|
1105
|
+
"rowLabel": "C-VWHa_rowLabel",
|
|
1106
|
+
"name": "C-VWHa_name",
|
|
1107
|
+
"switchOn": "C-VWHa_switchOn",
|
|
1108
|
+
"chevron": "C-VWHa_chevron",
|
|
1109
|
+
"header": "C-VWHa_header"
|
|
1110
1110
|
};
|
|
1111
1111
|
//#endregion
|
|
1112
1112
|
//#region src/client/SettingsCard.tsx
|
package/lib/index.js
CHANGED
|
@@ -2308,7 +2308,8 @@ function inputDetail(input) {
|
|
|
2308
2308
|
}
|
|
2309
2309
|
const json = JSON.stringify(record);
|
|
2310
2310
|
if (json === "{}") return void 0;
|
|
2311
|
-
|
|
2311
|
+
const cap = Object.values(record).some((value) => typeof value === "object" && value !== null) ? 16e3 : 160;
|
|
2312
|
+
return json.length <= cap ? json : `${json.slice(0, cap)}…`;
|
|
2312
2313
|
}
|
|
2313
2314
|
/**
|
|
2314
2315
|
* The actual edit behind an Edit/Write/MultiEdit/NotebookEdit tool_use, for
|
|
@@ -388,6 +388,8 @@ export declare function parseClaudeStreamJson(output: string): {
|
|
|
388
388
|
};
|
|
389
389
|
/** The placeholder think line for a `redacted_thinking` block (content is server-encrypted by design). */
|
|
390
390
|
export declare const REDACTED_THINKING_TEXT = "\uFF08\u601D\u8003\u5185\u5BB9\u5DF2\u7531\u670D\u52A1\u7AEF\u9690\u85CF\uFF1Aredacted_thinking\uFF0C\u5185\u5BB9\u6309\u8BBE\u8BA1\u4E0D\u53EF\u89C1\uFF0C\u6B64\u884C\u4EC5\u6807\u793A\u5B83\u5B58\u5728\uFF09";
|
|
391
|
+
/** Render a tool_use input payload as a compact command/query line. */
|
|
392
|
+
export declare function inputDetail(input: unknown): string | undefined;
|
|
391
393
|
/**
|
|
392
394
|
* Map claude's usage payload onto the shared usage contract. Claude's
|
|
393
395
|
* `input_tokens` is the uncached input; cache reads and cache creation are
|
|
@@ -915,7 +915,7 @@ const SERVER_TOOL_CARD_NAMES = {
|
|
|
915
915
|
web_fetch: 'WebFetch',
|
|
916
916
|
};
|
|
917
917
|
/** Render a tool_use input payload as a compact command/query line. */
|
|
918
|
-
function inputDetail(input) {
|
|
918
|
+
export function inputDetail(input) {
|
|
919
919
|
if (input === undefined)
|
|
920
920
|
return undefined;
|
|
921
921
|
if (typeof input === 'string')
|
|
@@ -933,7 +933,11 @@ function inputDetail(input) {
|
|
|
933
933
|
const json = JSON.stringify(record);
|
|
934
934
|
if (json === '{}')
|
|
935
935
|
return undefined;
|
|
936
|
-
|
|
936
|
+
// Structured input (an MCP tool's nested questions, options, lists) stays
|
|
937
|
+
// whole and parseable: a 160-character cut left ask_user_question unreadable.
|
|
938
|
+
const structured = Object.values(record).some(value => typeof value === 'object' && value !== null);
|
|
939
|
+
const cap = structured ? 16_000 : 160;
|
|
940
|
+
return json.length <= cap ? json : `${json.slice(0, cap)}…`;
|
|
937
941
|
}
|
|
938
942
|
/**
|
|
939
943
|
* The actual edit behind an Edit/Write/MultiEdit/NotebookEdit tool_use, for
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"local-agent",
|
|
9
9
|
"claude-code"
|
|
10
10
|
],
|
|
11
|
-
"version": "0.2.
|
|
11
|
+
"version": "0.2.2",
|
|
12
12
|
"type": "module",
|
|
13
13
|
"main": "lib/index.js",
|
|
14
14
|
"types": "lib/types/index.d.ts",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"dsh": ">=0.1.5-rc.1 <0.3.0-0"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@khorsheed/dsh-local-agent": "^0.2.
|
|
72
|
+
"@khorsheed/dsh-local-agent": "^0.2.2"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"@deepseek-ai/cordis": "^4.0.1",
|