@codexhost/cli-win32-x64 0.32.0 → 0.32.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/README.md +1 -1
- package/app/codexhost-distribution.json +1 -1
- package/app/console-server.mjs +217 -20
- package/app/console-web.js +123 -2
- package/app/desktop-controller.mjs +526 -143
- package/app/host-runtime.mjs +414 -148
- package/app/plugins/antigravity/plugin.mjs +10 -0
- package/app/plugins/claude-code/plugin.mjs +13 -0
- package/app/plugins/codebuddy/plugin.mjs +21 -2
- package/app/plugins/codex-usage/plugin.mjs +10 -0
- package/app/plugins/copilot/plugin.mjs +10 -0
- package/app/plugins/cursor-cli/plugin.mjs +10 -0
- package/app/plugins/deepseek-harness/plugin.mjs +10 -0
- package/app/plugins/devin/plugin.mjs +10 -0
- package/app/plugins/grok/plugin.mjs +10 -0
- package/app/plugins/hermes/plugin.mjs +10 -0
- package/app/plugins/kimi-code/plugin.mjs +10 -0
- package/app/plugins/kiro-cli/plugin.mjs +10 -0
- package/app/plugins/omp/plugin.mjs +10 -0
- package/app/plugins/opencode/plugin.mjs +10 -0
- package/app/plugins/pi/plugin.mjs +10 -0
- package/app/plugins/qoder/plugin.mjs +10 -0
- package/app/plugins/qoder-cn/plugin.mjs +10 -0
- package/app/plugins/qwen-code/plugin.mjs +10 -0
- package/app/plugins/workbuddy/plugin.mjs +21 -2
- package/app/plugins/zcode/plugin.mjs +10 -0
- package/app/renderer-extension.js +124 -4
- package/app/web/assets/{abnfDiagram-XWFEHMT6-CnJyN70L.js → abnfDiagram-XWFEHMT6-7XITZmBH.js} +1 -1
- package/app/web/assets/{architectureDiagram-CSQXQB3N-DH0ITYVE.js → architectureDiagram-CSQXQB3N-C8Usdzd8.js} +1 -1
- package/app/web/assets/{blockDiagram-BEDRHYPZ-WL3ZKoKg.js → blockDiagram-BEDRHYPZ-CyN9yE_Q.js} +1 -1
- package/app/web/assets/{c4Diagram-M2UUVUY5-XwSPKj5H.js → c4Diagram-M2UUVUY5-CjhY1l3g.js} +1 -1
- package/app/web/assets/{chunk-2Q5K7J3B-CKEzexjg.js → chunk-2Q5K7J3B-o24_rh4_.js} +1 -1
- package/app/web/assets/{chunk-3GCGMST5-BdEgLpab.js → chunk-3GCGMST5-D7bw3E1a.js} +1 -1
- package/app/web/assets/{chunk-5VM5RSS4-DyxL5-Ts.js → chunk-5VM5RSS4-D0v4acf7.js} +1 -1
- package/app/web/assets/{chunk-7U7NFRK5-FXLb4tYa.js → chunk-7U7NFRK5-CYJxP4rV.js} +1 -1
- package/app/web/assets/{chunk-CNRTWJTD-DcdC1OYr.js → chunk-CNRTWJTD-DTgCtcCl.js} +1 -1
- package/app/web/assets/{chunk-D5HYT7QG-BOz9vBX9.js → chunk-D5HYT7QG-qRNelehW.js} +1 -1
- package/app/web/assets/{chunk-EBZ3SEQC-Dmc_Z53x.js → chunk-EBZ3SEQC-BgJPPYdu.js} +2 -2
- package/app/web/assets/{chunk-JWPE2WC7-CrFwSwYi.js → chunk-JWPE2WC7-C50ZnSQQ.js} +1 -1
- package/app/web/assets/{chunk-KTR4FSNJ-BY3AzFaI.js → chunk-KTR4FSNJ-Cifh4XHc.js} +1 -1
- package/app/web/assets/{chunk-XXDRQBXY-CHgNy82n.js → chunk-XXDRQBXY-D23WAHPW.js} +1 -1
- package/app/web/assets/{classDiagram-v2-KXABOMEV-ClM3-y5Z.js → classDiagram-v2-KXABOMEV-B3cezFGj.js} +1 -1
- package/app/web/assets/{cose-bilkent-JH36ORCC-I7nd8GgO.js → cose-bilkent-JH36ORCC-VSMi4La2.js} +1 -1
- package/app/web/assets/{cynefin-EF2NZ3EQ-DzsXmyBH.js → cynefin-EF2NZ3EQ-qQnfHq16.js} +1 -1
- package/app/web/assets/{cynefinDiagram-NJNITYFG-DLHq6igy.js → cynefinDiagram-NJNITYFG-BJELApXD.js} +1 -1
- package/app/web/assets/{dagre-KIHZ2IZ3-BK991Mno.js → dagre-KIHZ2IZ3-C8B5ZMVs.js} +1 -1
- package/app/web/assets/{diagram-7YQZDPLS-C4qiWdQU.js → diagram-7YQZDPLS-HIWoNpzV.js} +1 -1
- package/app/web/assets/{diagram-QBROCOUO-C_ZyBohC.js → diagram-QBROCOUO-3_vS1jbp.js} +1 -1
- package/app/web/assets/{diagram-RJJCUUZO-C5Aezm94.js → diagram-RJJCUUZO-C_Kndn_e.js} +1 -1
- package/app/web/assets/{diagram-WERXNKYE-Ckc_umlF.js → diagram-WERXNKYE-BLWdOwya.js} +1 -1
- package/app/web/assets/{diagram-YHHI257C-BHjReoZZ.js → diagram-YHHI257C-DJeOs6eS.js} +1 -1
- package/app/web/assets/{diagram-YR4HJLHV-DVTGi_y9.js → diagram-YR4HJLHV-BKNULu-g.js} +1 -1
- package/app/web/assets/{ebnfDiagram-N527522P-getuz1AR.js → ebnfDiagram-N527522P-Bu8aReoF.js} +1 -1
- package/app/web/assets/{elk-O5DQBFGD-C7mhTIuK.js → elk-O5DQBFGD-CIp7Z0ER.js} +1 -1
- package/app/web/assets/{erDiagram-K3K3BIDK-sV-HZvUV.js → erDiagram-K3K3BIDK-BTsor1Lp.js} +1 -1
- package/app/web/assets/{flowDiagram-Z6JWZHQI-D0L4wXUs.js → flowDiagram-Z6JWZHQI-p_h5PKQr.js} +1 -1
- package/app/web/assets/{ganttDiagram-3PRQTZWP-BNt9Bjjo.js → ganttDiagram-3PRQTZWP-DKjfPPJ1.js} +1 -1
- package/app/web/assets/{gitGraphDiagram-VXDFKS5L-BABZzhHw.js → gitGraphDiagram-VXDFKS5L-RnPOf2fj.js} +1 -1
- package/app/web/assets/{grid-E2QIVN74-DLe2FQ_d.js → grid-E2QIVN74-C96GnBO1.js} +1 -1
- package/app/web/assets/{index-BLmkBEoq.js → index-CDRWzs-u.js} +67 -67
- package/app/web/assets/{infoDiagram-EZ3ZOAHP-BKDuUqcr.js → infoDiagram-EZ3ZOAHP-B68eZHsb.js} +1 -1
- package/app/web/assets/{ishikawaDiagram-S3EKX5GW-C75EGghg.js → ishikawaDiagram-S3EKX5GW-BLj7PFLt.js} +1 -1
- package/app/web/assets/{journeyDiagram-POQNLL5X-q7Obruqa.js → journeyDiagram-POQNLL5X-Bo-_In0d.js} +1 -1
- package/app/web/assets/{kanban-definition-BH5XI6FM-CzAqhFED.js → kanban-definition-BH5XI6FM-BpHvxprW.js} +1 -1
- package/app/web/assets/{mermaid.core-Bysx44LR.js → mermaid.core-COb9i2Gl.js} +4 -4
- package/app/web/assets/{mindmap-definition-WVAN44T4-Ds5rXTrF.js → mindmap-definition-WVAN44T4-DG15AlXd.js} +1 -1
- package/app/web/assets/{pegDiagram-D4NLKWP3-hmdERwtT.js → pegDiagram-D4NLKWP3-GMBk8RM6.js} +1 -1
- package/app/web/assets/{pieDiagram-36ENHN4W-DfTnyG8D.js → pieDiagram-36ENHN4W-BzeJgVnn.js} +1 -1
- package/app/web/assets/{quadrantDiagram-ZQUDMS73-CreQWjZQ.js → quadrantDiagram-ZQUDMS73-C--Kif6a.js} +1 -1
- package/app/web/assets/{railroadDiagram-JIZHGYPL-Bhc_eO9G.js → railroadDiagram-JIZHGYPL-NPLVu_R7.js} +1 -1
- package/app/web/assets/{render-VIF2ZAQL-BS1Zgk8K.js → render-VIF2ZAQL-DdpQ8E0J.js} +2 -2
- package/app/web/assets/{requirementDiagram-AXW2TVFA-Dlp7d6QT.js → requirementDiagram-AXW2TVFA-WWRwRbkA.js} +1 -1
- package/app/web/assets/{sankeyDiagram-FBCJTAIF-DGBchL30.js → sankeyDiagram-FBCJTAIF-hBr6pZ0V.js} +1 -1
- package/app/web/assets/{sequenceDiagram-3LA2ROMG-DauFg5_R.js → sequenceDiagram-3LA2ROMG-DvzZWy5J.js} +1 -1
- package/app/web/assets/{sizeCapture-2Q2CQKSF-DR-zy7an.js → sizeCapture-2Q2CQKSF-C2B86W70.js} +1 -1
- package/app/web/assets/{stateDiagram-v2-ATKHQDJO-BSRBSGUi.js → stateDiagram-v2-ATKHQDJO-Jwj3XqMx.js} +1 -1
- package/app/web/assets/{swimlanes-YQL5WMAO-BwzOr5Dv.js → swimlanes-YQL5WMAO-DxI0hC09.js} +1 -1
- package/app/web/assets/swimlanesDiagram-UCCPES4V-CR0nv8kJ.js +8 -0
- package/app/web/assets/{timeline-definition-7Z437IG3-BoZ-mNKc.js → timeline-definition-7Z437IG3-m8Ew8iuN.js} +1 -1
- package/app/web/assets/{usecaseDiagram-RDK6N6HP-DikhgH2m.js → usecaseDiagram-RDK6N6HP-BsiPSzIT.js} +1 -1
- package/app/web/assets/{vennDiagram-SHRQU5PJ-DY_oIxwl.js → vennDiagram-SHRQU5PJ-yYfXhiGp.js} +1 -1
- package/app/web/assets/{wardleyDiagram-F3OXNVQS-DrRIiB_M.js → wardleyDiagram-F3OXNVQS-DHLEfnsg.js} +1 -1
- package/app/web/assets/{xychartDiagram-GDYJKCDI-CzSPgHV7.js → xychartDiagram-GDYJKCDI-Drn_UxYt.js} +1 -1
- package/app/web/codexhost-settings.js +54 -54
- package/app/web/index.html +1 -1
- package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +8 -8
- package/app/web/plugins/deepseek-ai__dsh-client-ui-attachment/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +13 -13
- package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +66 -66
- package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +16 -16
- package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +18 -18
- package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +8 -8
- package/app/web-modules/server.mjs +44 -7
- package/bin/codexhost.exe +0 -0
- package/libexec/codexhost-node-repl.exe +0 -0
- package/libexec/codexhost-screenshot.exe +0 -0
- package/libexec/codexhost-shell.exe +0 -0
- package/libexec/codexhost-shim.exe +0 -0
- package/libexec/codexhost-updater.exe +0 -0
- package/package.json +1 -1
- package/app/web/assets/swimlanesDiagram-UCCPES4V-CNV63-us.js +0 -8
|
@@ -20888,6 +20888,7 @@ var HOST_EXTENSIONS_RPC = {
|
|
|
20888
20888
|
snapshot: "codexhost/extensions/snapshot",
|
|
20889
20889
|
catalog: "codexhost/extensions/catalog",
|
|
20890
20890
|
catalogIcon: "codexhost/extensions/catalogIcon",
|
|
20891
|
+
catalogScreenshot: "codexhost/extensions/catalogScreenshot",
|
|
20891
20892
|
install: "codexhost/extensions/install",
|
|
20892
20893
|
update: "codexhost/extensions/update",
|
|
20893
20894
|
enable: "codexhost/extensions/enable",
|
|
@@ -20924,6 +20925,11 @@ var hostExtensionsCatalogIconResultSchema = external_exports.strictObject({
|
|
|
20924
20925
|
mimeType: external_exports.enum(["image/png", "image/jpeg", "image/webp"]),
|
|
20925
20926
|
base64: base643(DESKTOP_EXTENSION_ICON_MAX_BYTES)
|
|
20926
20927
|
});
|
|
20928
|
+
var hostExtensionCatalogScreenshotIndexSchema = external_exports.int().min(0).max(DESKTOP_EXTENSION_SCREENSHOT_LIMIT - 1);
|
|
20929
|
+
var hostExtensionsCatalogScreenshotResultSchema = external_exports.strictObject({
|
|
20930
|
+
mimeType: external_exports.enum(["image/png", "image/jpeg", "image/webp"]),
|
|
20931
|
+
base64: base643(DESKTOP_EXTENSION_SCREENSHOT_MAX_BYTES)
|
|
20932
|
+
});
|
|
20927
20933
|
var hostExtensionSettingsSchema = external_exports.strictObject({
|
|
20928
20934
|
settingsRevision: hostExtensionRevisionSchema,
|
|
20929
20935
|
values: jsonObjectSchema
|
|
@@ -20942,6 +20948,10 @@ var hostExtensionsRpcSchemas = {
|
|
|
20942
20948
|
params: external_exports.strictObject({ ...id }),
|
|
20943
20949
|
result: hostExtensionsCatalogIconResultSchema
|
|
20944
20950
|
},
|
|
20951
|
+
[HOST_EXTENSIONS_RPC.catalogScreenshot]: {
|
|
20952
|
+
params: external_exports.strictObject({ ...id, index: hostExtensionCatalogScreenshotIndexSchema }),
|
|
20953
|
+
result: hostExtensionsCatalogScreenshotResultSchema
|
|
20954
|
+
},
|
|
20945
20955
|
[HOST_EXTENSIONS_RPC.install]: {
|
|
20946
20956
|
params: external_exports.strictObject({ source: hostExtensionInstallSourceSchema }),
|
|
20947
20957
|
result: installationResult
|
|
@@ -25477,6 +25487,7 @@ function permissionLocalizations(label, description) {
|
|
|
25477
25487
|
}
|
|
25478
25488
|
|
|
25479
25489
|
// ../codebuddy/dist/configuration.js
|
|
25490
|
+
var CUSTOM_LOCAL_MODEL_PREFIX = "custom-local:";
|
|
25480
25491
|
var CODEBUDDY_CAPABILITIES = {
|
|
25481
25492
|
configuration: {
|
|
25482
25493
|
selectModel: true,
|
|
@@ -25512,6 +25523,9 @@ function configuration(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
|
25512
25523
|
}));
|
|
25513
25524
|
const currentModelRef = modelRef(text2(model2.currentValue));
|
|
25514
25525
|
let currentModel = models.find((item) => item.ref.id === currentModelRef.id);
|
|
25526
|
+
if (!currentModel && !profile.allowUnlistedModelSelection && !currentModelRef.id.startsWith(CUSTOM_LOCAL_MODEL_PREFIX)) {
|
|
25527
|
+
currentModel = models.find((item) => item.ref.id === `${CUSTOM_LOCAL_MODEL_PREFIX}${currentModelRef.id}`);
|
|
25528
|
+
}
|
|
25515
25529
|
if (!currentModel && profile.allowUnlistedModelSelection) {
|
|
25516
25530
|
currentModel = { ref: currentModelRef, label: text2(model2.currentValue) };
|
|
25517
25531
|
models.push(currentModel);
|
|
@@ -25547,6 +25561,11 @@ function configuration(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
|
25547
25561
|
};
|
|
25548
25562
|
return { catalog, permissionModes, state, options };
|
|
25549
25563
|
}
|
|
25564
|
+
function effectiveOptionValue(config2, id2) {
|
|
25565
|
+
if (id2 === "model")
|
|
25566
|
+
return config2.state.effectiveModel?.id;
|
|
25567
|
+
return config2.options.find((option) => option.id === id2)?.currentValue;
|
|
25568
|
+
}
|
|
25550
25569
|
async function selectConfiguration(config2, id2, value, profile, request) {
|
|
25551
25570
|
const option = config2?.options.find((option2) => option2.id === id2);
|
|
25552
25571
|
const listed = rows(option?.options).some((option2) => option2.value === value);
|
|
@@ -25560,7 +25579,7 @@ async function restoreConfiguration(config2, saved, profile, request) {
|
|
|
25560
25579
|
["thought_level", saved.effectiveThinkingOptionId],
|
|
25561
25580
|
["mode", saved.effectivePermissionModeId]
|
|
25562
25581
|
];
|
|
25563
|
-
const matches = (id2, value) => config2
|
|
25582
|
+
const matches = (id2, value) => effectiveOptionValue(config2, id2) === value;
|
|
25564
25583
|
for (const [id2, value] of selections) {
|
|
25565
25584
|
if (value && !matches(id2, value))
|
|
25566
25585
|
config2 = await selectConfiguration(config2, id2, value, profile, request);
|
|
@@ -25573,7 +25592,7 @@ async function restoreConfiguration(config2, saved, profile, request) {
|
|
|
25573
25592
|
}
|
|
25574
25593
|
function confirmedConfiguration(response, id2, value, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
25575
25594
|
const result = configuration(record3(response).configOptions, profile);
|
|
25576
|
-
if (result
|
|
25595
|
+
if (effectiveOptionValue(result, id2) !== value) {
|
|
25577
25596
|
throw new CodeBuddyError("protocolError", `ACP did not confirm ${id2}`);
|
|
25578
25597
|
}
|
|
25579
25598
|
return result;
|
|
@@ -21076,6 +21076,7 @@ var HOST_EXTENSIONS_RPC = {
|
|
|
21076
21076
|
snapshot: "codexhost/extensions/snapshot",
|
|
21077
21077
|
catalog: "codexhost/extensions/catalog",
|
|
21078
21078
|
catalogIcon: "codexhost/extensions/catalogIcon",
|
|
21079
|
+
catalogScreenshot: "codexhost/extensions/catalogScreenshot",
|
|
21079
21080
|
install: "codexhost/extensions/install",
|
|
21080
21081
|
update: "codexhost/extensions/update",
|
|
21081
21082
|
enable: "codexhost/extensions/enable",
|
|
@@ -21112,6 +21113,11 @@ var hostExtensionsCatalogIconResultSchema = external_exports.strictObject({
|
|
|
21112
21113
|
mimeType: external_exports.enum(["image/png", "image/jpeg", "image/webp"]),
|
|
21113
21114
|
base64: base643(DESKTOP_EXTENSION_ICON_MAX_BYTES)
|
|
21114
21115
|
});
|
|
21116
|
+
var hostExtensionCatalogScreenshotIndexSchema = external_exports.int().min(0).max(DESKTOP_EXTENSION_SCREENSHOT_LIMIT - 1);
|
|
21117
|
+
var hostExtensionsCatalogScreenshotResultSchema = external_exports.strictObject({
|
|
21118
|
+
mimeType: external_exports.enum(["image/png", "image/jpeg", "image/webp"]),
|
|
21119
|
+
base64: base643(DESKTOP_EXTENSION_SCREENSHOT_MAX_BYTES)
|
|
21120
|
+
});
|
|
21115
21121
|
var hostExtensionSettingsSchema = external_exports.strictObject({
|
|
21116
21122
|
settingsRevision: hostExtensionRevisionSchema,
|
|
21117
21123
|
values: jsonObjectSchema
|
|
@@ -21130,6 +21136,10 @@ var hostExtensionsRpcSchemas = {
|
|
|
21130
21136
|
params: external_exports.strictObject({ ...id }),
|
|
21131
21137
|
result: hostExtensionsCatalogIconResultSchema
|
|
21132
21138
|
},
|
|
21139
|
+
[HOST_EXTENSIONS_RPC.catalogScreenshot]: {
|
|
21140
|
+
params: external_exports.strictObject({ ...id, index: hostExtensionCatalogScreenshotIndexSchema }),
|
|
21141
|
+
result: hostExtensionsCatalogScreenshotResultSchema
|
|
21142
|
+
},
|
|
21133
21143
|
[HOST_EXTENSIONS_RPC.install]: {
|
|
21134
21144
|
params: external_exports.strictObject({ source: hostExtensionInstallSourceSchema }),
|
|
21135
21145
|
result: installationResult
|
|
@@ -21235,6 +21235,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21235
21235
|
snapshot: "codexhost/extensions/snapshot",
|
|
21236
21236
|
catalog: "codexhost/extensions/catalog",
|
|
21237
21237
|
catalogIcon: "codexhost/extensions/catalogIcon",
|
|
21238
|
+
catalogScreenshot: "codexhost/extensions/catalogScreenshot",
|
|
21238
21239
|
install: "codexhost/extensions/install",
|
|
21239
21240
|
update: "codexhost/extensions/update",
|
|
21240
21241
|
enable: "codexhost/extensions/enable",
|
|
@@ -21271,6 +21272,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21271
21272
|
mimeType: external_exports.enum(["image/png", "image/jpeg", "image/webp"]),
|
|
21272
21273
|
base64: base643(DESKTOP_EXTENSION_ICON_MAX_BYTES)
|
|
21273
21274
|
});
|
|
21275
|
+
var hostExtensionCatalogScreenshotIndexSchema = external_exports.int().min(0).max(DESKTOP_EXTENSION_SCREENSHOT_LIMIT - 1);
|
|
21276
|
+
var hostExtensionsCatalogScreenshotResultSchema = external_exports.strictObject({
|
|
21277
|
+
mimeType: external_exports.enum(["image/png", "image/jpeg", "image/webp"]),
|
|
21278
|
+
base64: base643(DESKTOP_EXTENSION_SCREENSHOT_MAX_BYTES)
|
|
21279
|
+
});
|
|
21274
21280
|
var hostExtensionSettingsSchema = external_exports.strictObject({
|
|
21275
21281
|
settingsRevision: hostExtensionRevisionSchema,
|
|
21276
21282
|
values: jsonObjectSchema
|
|
@@ -21289,6 +21295,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
21289
21295
|
params: external_exports.strictObject({ ...id }),
|
|
21290
21296
|
result: hostExtensionsCatalogIconResultSchema
|
|
21291
21297
|
},
|
|
21298
|
+
[HOST_EXTENSIONS_RPC.catalogScreenshot]: {
|
|
21299
|
+
params: external_exports.strictObject({ ...id, index: hostExtensionCatalogScreenshotIndexSchema }),
|
|
21300
|
+
result: hostExtensionsCatalogScreenshotResultSchema
|
|
21301
|
+
},
|
|
21292
21302
|
[HOST_EXTENSIONS_RPC.install]: {
|
|
21293
21303
|
params: external_exports.strictObject({ source: hostExtensionInstallSourceSchema }),
|
|
21294
21304
|
result: installationResult
|
|
@@ -36882,6 +36892,15 @@ ${messages.refreshModels}` : view.error ?? accessibleLabel;
|
|
|
36882
36892
|
await manager.sendRequest(HOST_EXTENSIONS_RPC.catalogIcon, schema.params.parse(input3))
|
|
36883
36893
|
);
|
|
36884
36894
|
},
|
|
36895
|
+
async readHostExtensionCatalogScreenshot(input3) {
|
|
36896
|
+
const schema = hostExtensionsRpcSchemas[HOST_EXTENSIONS_RPC.catalogScreenshot];
|
|
36897
|
+
return schema.result.parse(
|
|
36898
|
+
await manager.sendRequest(
|
|
36899
|
+
HOST_EXTENSIONS_RPC.catalogScreenshot,
|
|
36900
|
+
schema.params.parse(input3)
|
|
36901
|
+
)
|
|
36902
|
+
);
|
|
36903
|
+
},
|
|
36885
36904
|
async installHostExtension(input3) {
|
|
36886
36905
|
const schema = hostExtensionsRpcSchemas[HOST_EXTENSIONS_RPC.install];
|
|
36887
36906
|
return extensionsChanged(
|
|
@@ -39119,8 +39138,7 @@ ${text2.includes("## My request:") ? "" : "\n## My request:\n"}`,
|
|
|
39119
39138
|
});
|
|
39120
39139
|
};
|
|
39121
39140
|
const canOpenForComposer = (composer) => {
|
|
39122
|
-
|
|
39123
|
-
if (disposed || orbitComposerKind(composer) !== "codex" || hasNativeComposerRequest(composer) || !isComposerVisible(composer, ownerWindow) || !sendButton || !isComposerVisible(sendButton, ownerWindow) || !resolveThreadId(composer))
|
|
39141
|
+
if (disposed || orbitComposerKind(composer) !== "codex" || hasNativeComposerRequest(composer) || !isComposerVisible(composer, ownerWindow) || !resolveThreadId(composer))
|
|
39124
39142
|
return false;
|
|
39125
39143
|
const hasStop = [...composer.querySelectorAll("button")].some(
|
|
39126
39144
|
(button2) => isComposerVisible(button2, ownerWindow) && /^(stop|stop generating|stop streaming|停止|停止生成|停止响应)$/iu.test(
|
|
@@ -47510,14 +47528,19 @@ ${detail}` : ""}`
|
|
|
47510
47528
|
|
|
47511
47529
|
// src/settings/desktop-extensions-catalog-icons.ts
|
|
47512
47530
|
var MAX_CACHE_ENTRIES = 200;
|
|
47531
|
+
var MAX_SCREENSHOT_CACHE_ENTRIES = 64;
|
|
47513
47532
|
var FAILED_RETRY_DELAY_MS = 6e4;
|
|
47533
|
+
var SAFE_SCREENSHOT_DATA_URL_PATTERN2 = /^data:image\/(?:png|jpeg|webp);base64,[A-Za-z0-9+/]+={0,2}$/u;
|
|
47514
47534
|
function iconCacheKey(entry) {
|
|
47515
47535
|
return `${entry.id}@${entry.version}`;
|
|
47516
47536
|
}
|
|
47517
|
-
function
|
|
47537
|
+
function screenshotCacheKey(entry, index) {
|
|
47538
|
+
return `${entry.id}@${entry.version}#${index}`;
|
|
47539
|
+
}
|
|
47540
|
+
function setBounded(map2, key2, value, limit = MAX_CACHE_ENTRIES) {
|
|
47518
47541
|
if (map2.has(key2)) map2.delete(key2);
|
|
47519
47542
|
map2.set(key2, value);
|
|
47520
|
-
while (map2.size >
|
|
47543
|
+
while (map2.size > limit) {
|
|
47521
47544
|
const oldest = map2.keys().next().value;
|
|
47522
47545
|
if (oldest === void 0) break;
|
|
47523
47546
|
map2.delete(oldest);
|
|
@@ -47569,6 +47592,51 @@ ${detail}` : ""}`
|
|
|
47569
47592
|
}
|
|
47570
47593
|
};
|
|
47571
47594
|
}
|
|
47595
|
+
function createDesktopCatalogScreenshotLoader(getReader) {
|
|
47596
|
+
const resolved = /* @__PURE__ */ new Map();
|
|
47597
|
+
const failedAt = /* @__PURE__ */ new Map();
|
|
47598
|
+
const inFlight = /* @__PURE__ */ new Map();
|
|
47599
|
+
return {
|
|
47600
|
+
isAvailable: () => typeof getReader() === "function",
|
|
47601
|
+
getCached(entry, index) {
|
|
47602
|
+
return resolved.get(screenshotCacheKey(entry, index));
|
|
47603
|
+
},
|
|
47604
|
+
async load(entry, index) {
|
|
47605
|
+
if (!entry.screenshots?.[index]) return null;
|
|
47606
|
+
const key2 = screenshotCacheKey(entry, index);
|
|
47607
|
+
const cached2 = resolved.get(key2);
|
|
47608
|
+
if (cached2) return cached2;
|
|
47609
|
+
const lastFailure = failedAt.get(key2);
|
|
47610
|
+
if (lastFailure !== void 0 && Date.now() - lastFailure < FAILED_RETRY_DELAY_MS) {
|
|
47611
|
+
return null;
|
|
47612
|
+
}
|
|
47613
|
+
const existing = inFlight.get(key2);
|
|
47614
|
+
if (existing) return existing;
|
|
47615
|
+
const reader = getReader();
|
|
47616
|
+
if (!reader) return null;
|
|
47617
|
+
const task = (async () => {
|
|
47618
|
+
try {
|
|
47619
|
+
const result = await reader({ id: entry.id, index });
|
|
47620
|
+
const dataUrl = `data:${result.mimeType};base64,${result.base64}`;
|
|
47621
|
+
if (!SAFE_SCREENSHOT_DATA_URL_PATTERN2.test(dataUrl)) {
|
|
47622
|
+
setBounded(failedAt, key2, Date.now(), MAX_SCREENSHOT_CACHE_ENTRIES);
|
|
47623
|
+
return null;
|
|
47624
|
+
}
|
|
47625
|
+
failedAt.delete(key2);
|
|
47626
|
+
setBounded(resolved, key2, dataUrl, MAX_SCREENSHOT_CACHE_ENTRIES);
|
|
47627
|
+
return dataUrl;
|
|
47628
|
+
} catch {
|
|
47629
|
+
setBounded(failedAt, key2, Date.now(), MAX_SCREENSHOT_CACHE_ENTRIES);
|
|
47630
|
+
return null;
|
|
47631
|
+
} finally {
|
|
47632
|
+
inFlight.delete(key2);
|
|
47633
|
+
}
|
|
47634
|
+
})();
|
|
47635
|
+
inFlight.set(key2, task);
|
|
47636
|
+
return task;
|
|
47637
|
+
}
|
|
47638
|
+
};
|
|
47639
|
+
}
|
|
47572
47640
|
|
|
47573
47641
|
// src/settings/desktop-extensions-create-modal.ts
|
|
47574
47642
|
var DESKTOP_EXTENSION_SKILL_URL = "https://github.com/BytePioneer-AI/codex-host/blob/main/.agents/skills/codexhost-add-desktop-extension/SKILL.md";
|
|
@@ -48049,6 +48117,7 @@ ${detail}` : ""}`
|
|
|
48049
48117
|
settingsClient,
|
|
48050
48118
|
assetClient,
|
|
48051
48119
|
catalogIconLoader,
|
|
48120
|
+
catalogScreenshotLoader,
|
|
48052
48121
|
onSettingsSaved,
|
|
48053
48122
|
onToggle,
|
|
48054
48123
|
onInstall,
|
|
@@ -48303,6 +48372,52 @@ ${detail}` : ""}`
|
|
|
48303
48372
|
renderScreenshotList(extensionId, fetchedLocalScreenshots, displayName);
|
|
48304
48373
|
return;
|
|
48305
48374
|
}
|
|
48375
|
+
const catalogShots = [];
|
|
48376
|
+
if (!inlineLocal && manifestPaths.length === 0 && catalogEntry?.screenshots?.length) {
|
|
48377
|
+
for (let index = 0; index < catalogEntry.screenshots.length; index += 1) {
|
|
48378
|
+
const safe = parseSafeHttpUrl(catalogEntry.screenshots[index]);
|
|
48379
|
+
if (safe) catalogShots.push({ index, fallbackUrl: safe });
|
|
48380
|
+
}
|
|
48381
|
+
}
|
|
48382
|
+
if (catalogEntry && catalogShots.length > 0 && catalogScreenshotLoader?.isAvailable()) {
|
|
48383
|
+
const cachedUrls = catalogShots.map(
|
|
48384
|
+
(shot) => catalogScreenshotLoader.getCached(catalogEntry, shot.index)
|
|
48385
|
+
);
|
|
48386
|
+
if (cachedUrls.every((url2) => typeof url2 === "string")) {
|
|
48387
|
+
screenshotsLoadToken += 1;
|
|
48388
|
+
fetchedScreenshotsKey = "";
|
|
48389
|
+
fetchedLocalScreenshots = [];
|
|
48390
|
+
renderScreenshotList(extensionId, cachedUrls, displayName);
|
|
48391
|
+
return;
|
|
48392
|
+
}
|
|
48393
|
+
const catalogFetchKey = `catalog\0${catalogEntry.id}\0${catalogEntry.version}\0${catalogShots.map((shot) => shot.index).join(",")}`;
|
|
48394
|
+
if (fetchedScreenshotsKey === catalogFetchKey && fetchedLocalScreenshots.length > 0) {
|
|
48395
|
+
renderScreenshotList(extensionId, fetchedLocalScreenshots, displayName);
|
|
48396
|
+
return;
|
|
48397
|
+
}
|
|
48398
|
+
if (fetchedScreenshotsKey !== catalogFetchKey) {
|
|
48399
|
+
fetchedScreenshotsKey = catalogFetchKey;
|
|
48400
|
+
fetchedLocalScreenshots = [];
|
|
48401
|
+
const token = ++screenshotsLoadToken;
|
|
48402
|
+
void Promise.all(
|
|
48403
|
+
catalogShots.map(
|
|
48404
|
+
(shot) => catalogScreenshotLoader.load(catalogEntry, shot.index).then((loaded) => loaded ?? shot.fallbackUrl)
|
|
48405
|
+
)
|
|
48406
|
+
).then((resolved) => {
|
|
48407
|
+
if (token !== screenshotsLoadToken || signal.aborted || openExtensionId !== extensionId) {
|
|
48408
|
+
return;
|
|
48409
|
+
}
|
|
48410
|
+
fetchedLocalScreenshots = resolved;
|
|
48411
|
+
renderScreenshotList(extensionId, resolved, displayName);
|
|
48412
|
+
});
|
|
48413
|
+
}
|
|
48414
|
+
return;
|
|
48415
|
+
}
|
|
48416
|
+
if (!fetchKey || !assetClient || fetchedScreenshotsKey !== fetchKey) {
|
|
48417
|
+
screenshotsLoadToken += 1;
|
|
48418
|
+
fetchedScreenshotsKey = "";
|
|
48419
|
+
fetchedLocalScreenshots = [];
|
|
48420
|
+
}
|
|
48306
48421
|
renderScreenshotList(extensionId, safeScreenshotUrls(installed, catalogEntry), displayName);
|
|
48307
48422
|
if (fetchKey && assetClient && installed?.state === "valid" && fetchedScreenshotsKey !== fetchKey) {
|
|
48308
48423
|
fetchedScreenshotsKey = fetchKey;
|
|
@@ -50373,6 +50488,10 @@ ${detail}` : ""}`
|
|
|
50373
50488
|
const client = resolveAvailableClient(getClient);
|
|
50374
50489
|
return client?.readHostExtensionCatalogIcon?.bind(client);
|
|
50375
50490
|
});
|
|
50491
|
+
const catalogScreenshotLoader = createDesktopCatalogScreenshotLoader(() => {
|
|
50492
|
+
const client = resolveAvailableClient(getClient);
|
|
50493
|
+
return client?.readHostExtensionCatalogScreenshot?.bind(client);
|
|
50494
|
+
});
|
|
50376
50495
|
const hasPendingMutations = () => pendingMutations.size > 0 || importing || recovering;
|
|
50377
50496
|
const clientCapabilities = () => {
|
|
50378
50497
|
const client = resolveAvailableClient(getClient);
|
|
@@ -50452,6 +50571,7 @@ ${detail}` : ""}`
|
|
|
50452
50571
|
signal: context.signal,
|
|
50453
50572
|
messages,
|
|
50454
50573
|
catalogIconLoader,
|
|
50574
|
+
catalogScreenshotLoader,
|
|
50455
50575
|
assetClient: {
|
|
50456
50576
|
async readAsset(input3) {
|
|
50457
50577
|
const reader = resolveAvailableClient(getClient)?.readHostExtensionAsset;
|
package/app/web/assets/{abnfDiagram-XWFEHMT6-CnJyN70L.js → abnfDiagram-XWFEHMT6-7XITZmBH.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as p,r as u,d as a}from"./chunk-7U7NFRK5-
|
|
1
|
+
import{g as p,r as u,d as a}from"./chunk-7U7NFRK5-CYJxP4rV.js";import{p as f}from"./chunk-JWPE2WC7-C50ZnSQQ.js";import{_ as n,l as o}from"./mermaid.core-COb9i2Gl.js";import{M as c,b as d}from"./cynefin-EF2NZ3EQ-qQnfHq16.js";import"./index-CDRWzs-u.js";import"./vendor-BKfNgqAm.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},F={parser:R,db:a,renderer:u,styles:p};export{F as diagram};
|