@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.js
CHANGED
|
@@ -1995,11 +1995,7 @@ function createAgentPanel(document, ai, localizer) {
|
|
|
1995
1995
|
job.append(jobMeta, phase, error, activity, resultPanel);
|
|
1996
1996
|
root.append(header, setup, job);
|
|
1997
1997
|
const testButton = createButton(document, messages.agent.testConnection);
|
|
1998
|
-
const runButton = createButton(
|
|
1999
|
-
document,
|
|
2000
|
-
messages.agent.verifyAndRun,
|
|
2001
|
-
"spotpatch-run"
|
|
2002
|
-
);
|
|
1998
|
+
const runButton = createButton(document, messages.agent.run, "spotpatch-run");
|
|
2003
1999
|
const cancelButton = createButton(document, messages.agent.cancel);
|
|
2004
2000
|
const applyButton = createButton(document, messages.agent.apply, "spotpatch-primary");
|
|
2005
2001
|
const revertButton = createButton(document, messages.agent.revert);
|
|
@@ -2044,7 +2040,7 @@ function createAgentPanel(document, ai, localizer) {
|
|
|
2044
2040
|
};
|
|
2045
2041
|
const refreshActions = () => {
|
|
2046
2042
|
const setupVisible = ai.enabled && selectionVisible && !jobPresented;
|
|
2047
|
-
runButton.textContent = capabilityProbing ? messages.agent.verifying :
|
|
2043
|
+
runButton.textContent = capabilityProbing ? messages.agent.verifying : messages.agent.run;
|
|
2048
2044
|
runButton.classList.toggle("spotpatch-primary", capabilityReady);
|
|
2049
2045
|
testButton.hidden = !setupVisible;
|
|
2050
2046
|
runButton.hidden = !setupVisible;
|
|
@@ -2496,7 +2492,7 @@ var ERROR_MESSAGES_EN = Object.freeze({
|
|
|
2496
2492
|
[ERROR_CODES2.PROVIDER_AUTH_FAILED]: "The provider rejected authentication. Check the server-side Key.",
|
|
2497
2493
|
[ERROR_CODES2.PROVIDER_PROTOCOL_UNSUPPORTED]: "The relay does not match the configured OpenAI-compatible protocol.",
|
|
2498
2494
|
[ERROR_CODES2.MODEL_NOT_ALLOWED]: "The selected model profile is not allowed.",
|
|
2499
|
-
[ERROR_CODES2.MODEL_TOOL_CALL_UNSUPPORTED]: "The selected model did not
|
|
2495
|
+
[ERROR_CODES2.MODEL_TOOL_CALL_UNSUPPORTED]: "The selected model did not start or continue the required tool call.",
|
|
2500
2496
|
[ERROR_CODES2.PROVIDER_RATE_LIMITED]: "The provider is rate limited. Wait and try again.",
|
|
2501
2497
|
[ERROR_CODES2.AGENT_BUSY]: "Another write Agent job is still active.",
|
|
2502
2498
|
[ERROR_CODES2.AGENT_LIMIT_EXCEEDED]: "The Agent stopped at a configured time, turn, output, or size limit.",
|
|
@@ -2531,7 +2527,7 @@ var ERROR_MESSAGES_ZH = Object.freeze({
|
|
|
2531
2527
|
[ERROR_CODES2.PROVIDER_AUTH_FAILED]: "\u6A21\u578B\u670D\u52A1\u9274\u6743\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u670D\u52A1\u7AEF Key\u3002",
|
|
2532
2528
|
[ERROR_CODES2.PROVIDER_PROTOCOL_UNSUPPORTED]: "\u4E2D\u8F6C\u670D\u52A1\u4E0E\u914D\u7F6E\u7684 OpenAI \u517C\u5BB9\u534F\u8BAE\u4E0D\u4E00\u81F4\u3002",
|
|
2533
2529
|
[ERROR_CODES2.MODEL_NOT_ALLOWED]: "\u5F53\u524D\u6A21\u578B\u914D\u7F6E\u672A\u83B7\u6388\u6743\u3002",
|
|
2534
|
-
[ERROR_CODES2.MODEL_TOOL_CALL_UNSUPPORTED]: "\u5F53\u524D\u6A21\u578B\u672A\
|
|
2530
|
+
[ERROR_CODES2.MODEL_TOOL_CALL_UNSUPPORTED]: "\u5F53\u524D\u6A21\u578B\u672A\u5B8C\u6210\u5FC5\u8981\u7684\u5DE5\u5177\u8C03\u7528\u6216\u7ED3\u679C\u7EED\u63A5\u3002",
|
|
2535
2531
|
[ERROR_CODES2.PROVIDER_RATE_LIMITED]: "\u6A21\u578B\u670D\u52A1\u6B63\u5728\u9650\u6D41\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",
|
|
2536
2532
|
[ERROR_CODES2.AGENT_BUSY]: "\u5F53\u524D\u9879\u76EE\u5DF2\u6709\u4E00\u4E2A\u5199\u5165\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\u3002",
|
|
2537
2533
|
[ERROR_CODES2.AGENT_LIMIT_EXCEEDED]: "Agent \u8FBE\u5230\u65F6\u95F4\u3001\u8F6E\u6B21\u3001\u8F93\u51FA\u6216\u53D8\u66F4\u89C4\u6A21\u9650\u5236\u3002",
|
|
@@ -2711,7 +2707,7 @@ var UI_MESSAGES = Object.freeze({
|
|
|
2711
2707
|
modelAriaLabel: "AI model",
|
|
2712
2708
|
providerUnavailable: "Provider configuration is unavailable.",
|
|
2713
2709
|
consent: (provider) => `I understand selected context and allowed source may be sent to ${provider}; its data policy is my responsibility.`,
|
|
2714
|
-
connectionNotTested: "
|
|
2710
|
+
connectionNotTested: "Optional connection check not run",
|
|
2715
2711
|
workspaceNotChecked: "Local workspace not checked",
|
|
2716
2712
|
checkingWorkspace: "Checking Git workspace and isolated execution\u2026",
|
|
2717
2713
|
workspaceReady: "Local workspace is ready for isolated execution",
|
|
@@ -2728,7 +2724,6 @@ var UI_MESSAGES = Object.freeze({
|
|
|
2728
2724
|
consentRequired: "Confirm remote provider data transmission before running AI.",
|
|
2729
2725
|
toolsReady: "tools and streaming ready",
|
|
2730
2726
|
testConnection: "Check environment",
|
|
2731
|
-
verifyAndRun: "Verify & run",
|
|
2732
2727
|
verifying: "Verifying\u2026",
|
|
2733
2728
|
run: "Run AI",
|
|
2734
2729
|
cancel: "Cancel agent",
|
|
@@ -2847,7 +2842,7 @@ var UI_MESSAGES = Object.freeze({
|
|
|
2847
2842
|
modelAriaLabel: "AI \u6A21\u578B",
|
|
2848
2843
|
providerUnavailable: "\u6A21\u578B\u670D\u52A1\u914D\u7F6E\u4E0D\u53EF\u7528\u3002",
|
|
2849
2844
|
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`,
|
|
2850
|
-
connectionNotTested: "\u5C1A\u672A\
|
|
2845
|
+
connectionNotTested: "\u5C1A\u672A\u6267\u884C\u53EF\u9009\u8FDE\u63A5\u68C0\u67E5",
|
|
2851
2846
|
workspaceNotChecked: "\u5C1A\u672A\u68C0\u67E5\u672C\u5730\u5DE5\u4F5C\u533A",
|
|
2852
2847
|
checkingWorkspace: "\u6B63\u5728\u68C0\u67E5 Git \u5DE5\u4F5C\u533A\u4E0E\u9694\u79BB\u6267\u884C\u73AF\u5883\u2026\u2026",
|
|
2853
2848
|
workspaceReady: "\u672C\u5730\u5DE5\u4F5C\u533A\u5DF2\u6EE1\u8DB3\u9694\u79BB\u6267\u884C\u6761\u4EF6",
|
|
@@ -2864,7 +2859,6 @@ var UI_MESSAGES = Object.freeze({
|
|
|
2864
2859
|
consentRequired: "\u8FD0\u884C AI \u524D\uFF0C\u8BF7\u5148\u786E\u8BA4\u5141\u8BB8\u5411\u8FDC\u7A0B\u6A21\u578B\u670D\u52A1\u4F20\u8F93\u6570\u636E\u3002",
|
|
2865
2860
|
toolsReady: "\u5DE5\u5177\u8C03\u7528\u4E0E\u6D41\u5F0F\u54CD\u5E94\u5DF2\u5C31\u7EEA",
|
|
2866
2861
|
testConnection: "\u68C0\u67E5\u8FD0\u884C\u73AF\u5883",
|
|
2867
|
-
verifyAndRun: "\u9A8C\u8BC1\u5E76\u8FD0\u884C",
|
|
2868
2862
|
verifying: "\u9A8C\u8BC1\u4E2D\u2026\u2026",
|
|
2869
2863
|
run: "\u8FD0\u884C AI",
|
|
2870
2864
|
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
|
}
|