@spotpatch/runtime 1.5.1 → 1.5.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/index.cjs +7 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -16
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1999,11 +1999,7 @@ function createAgentPanel(document, ai, localizer) {
|
|
|
1999
1999
|
job.append(jobMeta, phase, error, activity, resultPanel);
|
|
2000
2000
|
root.append(header, setup, job);
|
|
2001
2001
|
const testButton = createButton(document, messages.agent.testConnection);
|
|
2002
|
-
const runButton = createButton(
|
|
2003
|
-
document,
|
|
2004
|
-
messages.agent.verifyAndRun,
|
|
2005
|
-
"spotpatch-run"
|
|
2006
|
-
);
|
|
2002
|
+
const runButton = createButton(document, messages.agent.run, "spotpatch-run");
|
|
2007
2003
|
const cancelButton = createButton(document, messages.agent.cancel);
|
|
2008
2004
|
const applyButton = createButton(document, messages.agent.apply, "spotpatch-primary");
|
|
2009
2005
|
const revertButton = createButton(document, messages.agent.revert);
|
|
@@ -2048,7 +2044,7 @@ function createAgentPanel(document, ai, localizer) {
|
|
|
2048
2044
|
};
|
|
2049
2045
|
const refreshActions = () => {
|
|
2050
2046
|
const setupVisible = ai.enabled && selectionVisible && !jobPresented;
|
|
2051
|
-
runButton.textContent = capabilityProbing ? messages.agent.verifying :
|
|
2047
|
+
runButton.textContent = capabilityProbing ? messages.agent.verifying : messages.agent.run;
|
|
2052
2048
|
runButton.classList.toggle("spotpatch-primary", capabilityReady);
|
|
2053
2049
|
testButton.hidden = !setupVisible;
|
|
2054
2050
|
runButton.hidden = !setupVisible;
|
|
@@ -2498,7 +2494,7 @@ var ERROR_MESSAGES_EN = Object.freeze({
|
|
|
2498
2494
|
[import_shared6.ERROR_CODES.PROVIDER_AUTH_FAILED]: "The provider rejected authentication. Check the server-side Key.",
|
|
2499
2495
|
[import_shared6.ERROR_CODES.PROVIDER_PROTOCOL_UNSUPPORTED]: "The relay does not match the configured OpenAI-compatible protocol.",
|
|
2500
2496
|
[import_shared6.ERROR_CODES.MODEL_NOT_ALLOWED]: "The selected model profile is not allowed.",
|
|
2501
|
-
[import_shared6.ERROR_CODES.MODEL_TOOL_CALL_UNSUPPORTED]: "The selected model did not
|
|
2497
|
+
[import_shared6.ERROR_CODES.MODEL_TOOL_CALL_UNSUPPORTED]: "The selected model did not start or continue the required tool call.",
|
|
2502
2498
|
[import_shared6.ERROR_CODES.PROVIDER_RATE_LIMITED]: "The provider is rate limited. Wait and try again.",
|
|
2503
2499
|
[import_shared6.ERROR_CODES.AGENT_BUSY]: "Another write Agent job is still active.",
|
|
2504
2500
|
[import_shared6.ERROR_CODES.AGENT_LIMIT_EXCEEDED]: "The Agent stopped at a configured time, turn, output, or size limit.",
|
|
@@ -2533,7 +2529,7 @@ var ERROR_MESSAGES_ZH = Object.freeze({
|
|
|
2533
2529
|
[import_shared6.ERROR_CODES.PROVIDER_AUTH_FAILED]: "\u6A21\u578B\u670D\u52A1\u9274\u6743\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u670D\u52A1\u7AEF Key\u3002",
|
|
2534
2530
|
[import_shared6.ERROR_CODES.PROVIDER_PROTOCOL_UNSUPPORTED]: "\u4E2D\u8F6C\u670D\u52A1\u4E0E\u914D\u7F6E\u7684 OpenAI \u517C\u5BB9\u534F\u8BAE\u4E0D\u4E00\u81F4\u3002",
|
|
2535
2531
|
[import_shared6.ERROR_CODES.MODEL_NOT_ALLOWED]: "\u5F53\u524D\u6A21\u578B\u914D\u7F6E\u672A\u83B7\u6388\u6743\u3002",
|
|
2536
|
-
[import_shared6.ERROR_CODES.MODEL_TOOL_CALL_UNSUPPORTED]: "\u5F53\u524D\u6A21\u578B\u672A\
|
|
2532
|
+
[import_shared6.ERROR_CODES.MODEL_TOOL_CALL_UNSUPPORTED]: "\u5F53\u524D\u6A21\u578B\u672A\u5B8C\u6210\u5FC5\u8981\u7684\u5DE5\u5177\u8C03\u7528\u6216\u7ED3\u679C\u7EED\u63A5\u3002",
|
|
2537
2533
|
[import_shared6.ERROR_CODES.PROVIDER_RATE_LIMITED]: "\u6A21\u578B\u670D\u52A1\u6B63\u5728\u9650\u6D41\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",
|
|
2538
2534
|
[import_shared6.ERROR_CODES.AGENT_BUSY]: "\u5F53\u524D\u9879\u76EE\u5DF2\u6709\u4E00\u4E2A\u5199\u5165\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\u3002",
|
|
2539
2535
|
[import_shared6.ERROR_CODES.AGENT_LIMIT_EXCEEDED]: "Agent \u8FBE\u5230\u65F6\u95F4\u3001\u8F6E\u6B21\u3001\u8F93\u51FA\u6216\u53D8\u66F4\u89C4\u6A21\u9650\u5236\u3002",
|
|
@@ -2713,7 +2709,7 @@ var UI_MESSAGES = Object.freeze({
|
|
|
2713
2709
|
modelAriaLabel: "AI model",
|
|
2714
2710
|
providerUnavailable: "Provider configuration is unavailable.",
|
|
2715
2711
|
consent: (provider) => `I understand selected context and allowed source may be sent to ${provider}; its data policy is my responsibility.`,
|
|
2716
|
-
connectionNotTested: "
|
|
2712
|
+
connectionNotTested: "Optional connection check not run",
|
|
2717
2713
|
workspaceNotChecked: "Local workspace not checked",
|
|
2718
2714
|
checkingWorkspace: "Checking Git workspace and isolated execution\u2026",
|
|
2719
2715
|
workspaceReady: "Local workspace is ready for isolated execution",
|
|
@@ -2730,7 +2726,6 @@ var UI_MESSAGES = Object.freeze({
|
|
|
2730
2726
|
consentRequired: "Confirm remote provider data transmission before running AI.",
|
|
2731
2727
|
toolsReady: "tools and streaming ready",
|
|
2732
2728
|
testConnection: "Check environment",
|
|
2733
|
-
verifyAndRun: "Verify & run",
|
|
2734
2729
|
verifying: "Verifying\u2026",
|
|
2735
2730
|
run: "Run AI",
|
|
2736
2731
|
cancel: "Cancel agent",
|
|
@@ -2849,7 +2844,7 @@ var UI_MESSAGES = Object.freeze({
|
|
|
2849
2844
|
modelAriaLabel: "AI \u6A21\u578B",
|
|
2850
2845
|
providerUnavailable: "\u6A21\u578B\u670D\u52A1\u914D\u7F6E\u4E0D\u53EF\u7528\u3002",
|
|
2851
2846
|
consent: (provider) => `\u6211\u4E86\u89E3\u9009\u4E2D\u4E0A\u4E0B\u6587\u4E0E\u83B7\u51C6\u6E90\u7801\u53EF\u80FD\u53D1\u9001\u5230 ${provider}\uFF0C\u5E76\u81EA\u884C\u8D1F\u8D23\u5176\u6570\u636E\u7B56\u7565\u3002`,
|
|
2852
|
-
connectionNotTested: "\u5C1A\u672A\
|
|
2847
|
+
connectionNotTested: "\u5C1A\u672A\u6267\u884C\u53EF\u9009\u8FDE\u63A5\u68C0\u67E5",
|
|
2853
2848
|
workspaceNotChecked: "\u5C1A\u672A\u68C0\u67E5\u672C\u5730\u5DE5\u4F5C\u533A",
|
|
2854
2849
|
checkingWorkspace: "\u6B63\u5728\u68C0\u67E5 Git \u5DE5\u4F5C\u533A\u4E0E\u9694\u79BB\u6267\u884C\u73AF\u5883\u2026\u2026",
|
|
2855
2850
|
workspaceReady: "\u672C\u5730\u5DE5\u4F5C\u533A\u5DF2\u6EE1\u8DB3\u9694\u79BB\u6267\u884C\u6761\u4EF6",
|
|
@@ -2866,7 +2861,6 @@ var UI_MESSAGES = Object.freeze({
|
|
|
2866
2861
|
consentRequired: "\u8FD0\u884C AI \u524D\uFF0C\u8BF7\u5148\u786E\u8BA4\u5141\u8BB8\u5411\u8FDC\u7A0B\u6A21\u578B\u670D\u52A1\u4F20\u8F93\u6570\u636E\u3002",
|
|
2867
2862
|
toolsReady: "\u5DE5\u5177\u8C03\u7528\u4E0E\u6D41\u5F0F\u54CD\u5E94\u5DF2\u5C31\u7EEA",
|
|
2868
2863
|
testConnection: "\u68C0\u67E5\u8FD0\u884C\u73AF\u5883",
|
|
2869
|
-
verifyAndRun: "\u9A8C\u8BC1\u5E76\u8FD0\u884C",
|
|
2870
2864
|
verifying: "\u9A8C\u8BC1\u4E2D\u2026\u2026",
|
|
2871
2865
|
run: "\u8FD0\u884C AI",
|
|
2872
2866
|
cancel: "\u53D6\u6D88 Agent",
|
|
@@ -4709,10 +4703,7 @@ function createAgentWorkflow(options) {
|
|
|
4709
4703
|
providerConsents.add(selection.providerProfileId);
|
|
4710
4704
|
const workflowRevision = ++revision;
|
|
4711
4705
|
options.view.setAgentEditingEnabled(false);
|
|
4712
|
-
void
|
|
4713
|
-
probe(workflowRevision),
|
|
4714
|
-
refreshWorkspaceHealth(workflowRevision)
|
|
4715
|
-
]).then(async ([, health]) => {
|
|
4706
|
+
void refreshWorkspaceHealth(workflowRevision).then(async (health) => {
|
|
4716
4707
|
if (workflowRevision !== revision) {
|
|
4717
4708
|
return;
|
|
4718
4709
|
}
|