@canhta/dsh-autopilot 0.1.0-alpha.1 → 0.1.0-alpha.3
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 +46 -1
- package/lib/client-types/web/contract.d.ts +7 -0
- package/lib/client.js +71 -76
- package/lib/client.js.map +1 -1
- package/lib/mcp/index.d.ts +1 -0
- package/lib/mcp/index.js +1 -0
- package/lib/mcp/index.js.map +1 -1
- package/lib/mcp/probe.d.ts +14 -0
- package/lib/mcp/probe.js +19 -0
- package/lib/mcp/probe.js.map +1 -0
- package/lib/operations/retention.js +1 -1
- package/lib/operations/retention.js.map +1 -1
- package/lib/providers/github-issues/provider.js +19 -8
- package/lib/providers/github-issues/provider.js.map +1 -1
- package/lib/providers/jira/provider.js +19 -8
- package/lib/providers/jira/provider.js.map +1 -1
- package/lib/web/contract.d.ts +7 -0
- package/lib/web/contract.js +5 -4
- package/lib/web/contract.js.map +1 -1
- package/lib/web/contributions.d.ts +1 -1
- package/lib/web/projection.d.ts +1 -1
- package/lib/web/projection.js +4 -4
- package/lib/web/projection.js.map +1 -1
- package/lib/web/service.d.ts +1 -1
- package/lib/web/service.js +4 -4
- package/lib/web/service.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
# Autopilot
|
|
4
4
|
|
|
5
5
|
[](LICENSE)
|
|
6
|
+
[](https://www.npmjs.com/package/@canhta/dsh-autopilot)
|
|
6
7
|
[](https://github.com/canhta/dsh-autopilot/actions/workflows/ci.yml)
|
|
7
8
|
[](https://github.com/canhta/dsh-autopilot/releases)
|
|
8
9
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
@@ -53,7 +54,7 @@ Provider failures are isolated from the durable run result. For example, a notif
|
|
|
53
54
|
Requires an existing DSH installation.
|
|
54
55
|
|
|
55
56
|
```sh
|
|
56
|
-
dsh plugin --profile web add
|
|
57
|
+
dsh plugin --profile web add @canhta/dsh-autopilot@alpha
|
|
57
58
|
dsh --profile web
|
|
58
59
|
```
|
|
59
60
|
|
|
@@ -79,6 +80,50 @@ Open **Settings → Autopilot** to set the tracker and code-host bindings, sched
|
|
|
79
80
|
|
|
80
81
|
Fresh installs keep execution disabled. Before enabling it, select the DSH default Agent preset and model, then configure each provider's DSH Settings namespace and official MCP server in the same profile. Keep vendor OAuth, model keys and tokens in DSH Credentials; Autopilot does not create a second authentication flow.
|
|
81
82
|
|
|
83
|
+
<details>
|
|
84
|
+
<summary>Connect the GitHub and Jira MCP servers</summary>
|
|
85
|
+
|
|
86
|
+
Autopilot's providers call the vendor's **official** MCP server through DSH's [`dsh-mcp-client`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/mcp/mcp-client/README.md) plugin, not a third-party clone. Add one entry per server to the profile's patch layer (`$DSH_HOME/profiles/<profile>/cordis.patch.yml`), then restart the profile (`dsh --profile web`).
|
|
87
|
+
|
|
88
|
+
**GitHub** — the official remote server needs no local install or Docker:
|
|
89
|
+
|
|
90
|
+
```yaml
|
|
91
|
+
- insert:
|
|
92
|
+
- id: mcp-github
|
|
93
|
+
name: '@deepseek-ai/dsh-mcp-client'
|
|
94
|
+
config:
|
|
95
|
+
serverName: github
|
|
96
|
+
transport: streamable-http
|
|
97
|
+
url: https://api.githubcopilot.com/mcp/
|
|
98
|
+
headers:
|
|
99
|
+
Authorization: !!js '`Bearer ${process.env.GITHUB_TOKEN}`'
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Create a token at `github.com/settings/personal-access-tokens/new` with `Contents`, `Issues` and `Pull requests` read/write, then set `GITHUB_TOKEN` in your environment before starting DSH.
|
|
103
|
+
|
|
104
|
+
**Jira** — the Jira provider's MCP contracts target Atlassian's official **Rovo MCP Server**, not a community Jira MCP server. `serverName` must be `atlassian` (the provider's default):
|
|
105
|
+
|
|
106
|
+
```yaml
|
|
107
|
+
- insert:
|
|
108
|
+
- id: mcp-jira
|
|
109
|
+
name: '@deepseek-ai/dsh-mcp-client'
|
|
110
|
+
config:
|
|
111
|
+
serverName: atlassian
|
|
112
|
+
transport: streamable-http
|
|
113
|
+
# tools=all: Rovo only advertises a "primary" tool subset by default and expects
|
|
114
|
+
# on-demand discovery, which dsh-mcp-client's one-time tools/list bridge doesn't do.
|
|
115
|
+
url: https://mcp.atlassian.com/v2/mcp?tools=all
|
|
116
|
+
headers:
|
|
117
|
+
Authorization: !!js >-
|
|
118
|
+
`Basic ${Buffer.from(`${process.env.JIRA_EMAIL}:${process.env.JIRA_API_TOKEN}`).toString('base64')}`
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Create an API token at `id.atlassian.com/manage-profile/security/api-tokens`, then set `JIRA_EMAIL` (your Atlassian login) and `JIRA_API_TOKEN`. An org admin must also enable **API token authentication** for the Rovo MCP Server (Atlassian Administration → Rovo → Rovo MCP server → Authentication) — OAuth-only organizations can't use this Basic-auth header form and need a different client integration.
|
|
122
|
+
|
|
123
|
+
Once connected, each provider's Settings card in Autopilot reports a live `lookup` status instead of a placeholder — a real, cached probe against that provider's declared MCP tools, not a static message.
|
|
124
|
+
|
|
125
|
+
</details>
|
|
126
|
+
|
|
82
127
|
For a systemd-managed VPS installation and backup/restore procedure, see [One-VPS operation](docs/deployment.md).
|
|
83
128
|
|
|
84
129
|
## Contribute
|
|
@@ -29,6 +29,13 @@ export declare const operationsQuerySchema: z.ZodObject<{
|
|
|
29
29
|
attentionOnly: z.ZodOptional<z.ZodBoolean>;
|
|
30
30
|
}, z.core.$strip>;
|
|
31
31
|
export type OperationsQuery = z.infer<typeof operationsQuerySchema>;
|
|
32
|
+
export declare const providerLookupSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
33
|
+
status: z.ZodLiteral<"available">;
|
|
34
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
35
|
+
status: z.ZodLiteral<"unavailable">;
|
|
36
|
+
reason: z.ZodString;
|
|
37
|
+
}, z.core.$strip>], "status">;
|
|
38
|
+
export type ProviderLookupView = z.infer<typeof providerLookupSchema>;
|
|
32
39
|
export declare const providerViewSchema: z.ZodObject<{
|
|
33
40
|
id: z.ZodString;
|
|
34
41
|
displayName: z.ZodString;
|
package/lib/client.js
CHANGED
|
@@ -5303,6 +5303,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5303
5303
|
states: array(runLifecycleSchema).max(9).optional(),
|
|
5304
5304
|
attentionOnly: boolean().optional()
|
|
5305
5305
|
});
|
|
5306
|
+
const providerLookupSchema = discriminatedUnion("status", [object({ status: literal("available") }), object({
|
|
5307
|
+
status: literal("unavailable"),
|
|
5308
|
+
reason: string()
|
|
5309
|
+
})]);
|
|
5306
5310
|
const providerViewSchema = object({
|
|
5307
5311
|
id: string(),
|
|
5308
5312
|
displayName: string(),
|
|
@@ -5320,10 +5324,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5320
5324
|
label: string(),
|
|
5321
5325
|
ref: string()
|
|
5322
5326
|
})),
|
|
5323
|
-
lookup:
|
|
5324
|
-
status: literal("unavailable"),
|
|
5325
|
-
reason: string()
|
|
5326
|
-
})])
|
|
5327
|
+
lookup: providerLookupSchema
|
|
5327
5328
|
}), object({
|
|
5328
5329
|
status: literal("unavailable"),
|
|
5329
5330
|
reason: string()
|
|
@@ -6002,8 +6003,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6002
6003
|
configureHint: "请先在此设置页面选择已安装的提供方,再启用调度器。"
|
|
6003
6004
|
};
|
|
6004
6005
|
//#endregion
|
|
6005
|
-
//#region \0dsh-autopilot-css:/
|
|
6006
|
-
const css$1 = ".
|
|
6006
|
+
//#region \0dsh-autopilot-css:/home/runner/work/dsh-autopilot/dsh-autopilot/src/client/operations.module.css.mjs
|
|
6007
|
+
const css$1 = ".Fc_jqa_page{box-sizing:border-box;min-width:0;height:100%;color:var(--dsw-alias-label-primary,#202124);background:var(--dsw-alias-bg-layer-1,#fff);padding:20px 24px;font-size:14px;overflow:auto}.Fc_jqa_header,.Fc_jqa_headerActions,.Fc_jqa_toolbar,.Fc_jqa_detailHeader,.Fc_jqa_detailActions{align-items:center;gap:8px;display:flex}.Fc_jqa_header{justify-content:space-between;gap:24px;margin-bottom:14px}.Fc_jqa_header h1{margin:0;font-size:20px;line-height:1.3}.Fc_jqa_header p,.Fc_jqa_summary>p{color:var(--dsw-alias-label-secondary,#5f6368);margin:4px 0 0}.Fc_jqa_headerActions{flex-wrap:wrap;justify-content:flex-end}.Fc_jqa_connectionNotice,.Fc_jqa_attention,.Fc_jqa_command,.Fc_jqa_notice,.Fc_jqa_blocker{border:1px solid var(--dsw-alias-border-l3,#d9dce1);border-radius:8px;margin:8px 0;padding:10px 12px}.Fc_jqa_attention,.Fc_jqa_blocker{border-color:var(--dsw-alias-state-warn-primary,#a15c00);color:var(--dsw-alias-state-warn-label,#713f00)}.Fc_jqa_connectionNotice,.Fc_jqa_command,.Fc_jqa_notice{background:var(--dsw-alias-bg-layer-2,#f7f8fa)}.Fc_jqa_tabs{border-bottom:1px solid var(--dsw-alias-border-l3,#d9dce1);gap:4px;margin-top:16px;display:flex;overflow-x:auto}.Fc_jqa_tabs button{appearance:none;color:var(--dsw-alias-label-secondary,#5f6368);white-space:nowrap;cursor:pointer;background:0 0;border:0;border-bottom:2px solid #0000;padding:10px 12px}.Fc_jqa_tabs button:hover{background:var(--dsw-alias-interactive-bg-hover,#f1f3f4)}.Fc_jqa_tabs button:focus-visible,.Fc_jqa_runLink:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#315efb);outline-offset:2px}.Fc_jqa_tabs .Fc_jqa_activeTab{border-bottom-color:var(--dsw-alias-brand-primary,#315efb);color:var(--dsw-alias-label-primary,#202124)}.Fc_jqa_content{min-width:0;padding-top:16px}.Fc_jqa_runsOnly,.Fc_jqa_split{min-width:0}.Fc_jqa_split{grid-template-columns:minmax(480px,1fr) minmax(380px,460px);gap:16px;display:grid}.Fc_jqa_listRegion{min-width:0}.Fc_jqa_toolbar{flex-wrap:wrap;margin-bottom:12px}.Fc_jqa_toolbar select{border:1px solid var(--dsw-alias-border-l4,#c7cbd1);min-height:34px;color:inherit;background:var(--dsw-alias-bg-layer-1,#fff);border-radius:8px;padding:0 10px}.Fc_jqa_checkbox{align-items:center;gap:6px;display:inline-flex}.Fc_jqa_resultCount{color:var(--dsw-alias-label-tertiary,#767b83);font-variant-numeric:tabular-nums;margin-left:auto}.Fc_jqa_tableScroll{max-width:100%;overflow-x:auto}.Fc_jqa_table{border-collapse:collapse;table-layout:fixed;width:100%}.Fc_jqa_table th{color:var(--dsw-alias-label-tertiary,#767b83);text-align:left;padding:8px 10px;font-size:12px;font-weight:600}.Fc_jqa_table th:first-child{width:30%}.Fc_jqa_table th:nth-child(2){width:25%}.Fc_jqa_table td{border-top:1px solid var(--dsw-alias-border-l3,#e2e4e8);vertical-align:middle;height:48px;padding:8px 10px}.Fc_jqa_table tr[data-selected=true]{background:var(--dsw-alias-interactive-bg-active,#edf2ff)}.Fc_jqa_runLink{width:100%;min-width:0;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;padding:0;display:grid}.Fc_jqa_runLink span,.Fc_jqa_stateLabel>span,.Fc_jqa_worktreeList code{color:var(--dsw-alias-label-secondary,#5f6368);text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}.Fc_jqa_stateLabel{justify-items:start;gap:3px;display:grid}.Fc_jqa_numeric{text-align:right;font-variant-numeric:tabular-nums}.Fc_jqa_detail{border-left:1px solid var(--dsw-alias-border-l3,#d9dce1);min-width:0;padding-left:16px}.Fc_jqa_detailHeader{justify-content:space-between;align-items:flex-start;margin-top:12px}.Fc_jqa_detailHeader h2,.Fc_jqa_summary h2,.Fc_jqa_empty h2{margin:0;font-size:17px}.Fc_jqa_detailHeader p,.Fc_jqa_reason{margin:4px 0 10px}.Fc_jqa_detail details{border-top:1px solid var(--dsw-alias-border-l3,#d9dce1);padding:12px 0}.Fc_jqa_detail summary{cursor:pointer;font-weight:600}.Fc_jqa_longText{white-space:pre-wrap;overflow-wrap:anywhere}.Fc_jqa_timeline{gap:10px;padding-left:20px;display:grid}.Fc_jqa_timeline li{gap:2px;display:grid}.Fc_jqa_timeline time,.Fc_jqa_timeline span{color:var(--dsw-alias-label-tertiary,#767b83);font-size:12px}.Fc_jqa_resource{grid-template-columns:100px minmax(0,1fr);gap:8px;margin-top:8px;display:grid}.Fc_jqa_resource code,.Fc_jqa_resource span{overflow-wrap:anywhere}.Fc_jqa_summary,.Fc_jqa_empty{max-width:820px;padding:16px 0}.Fc_jqa_summary dl{gap:0;margin:16px 0;display:grid}.Fc_jqa_summary dl>div{border-top:1px solid var(--dsw-alias-border-l3,#d9dce1);grid-template-columns:minmax(160px,1fr) minmax(180px,2fr);gap:12px;padding:10px 0;display:grid}.Fc_jqa_summary dt{color:var(--dsw-alias-label-secondary,#5f6368)}.Fc_jqa_summary dd{margin:0}.Fc_jqa_empty{text-align:center;color:var(--dsw-alias-label-secondary,#5f6368)}.Fc_jqa_worktreeList{gap:0;padding:0;list-style:none;display:grid}.Fc_jqa_worktreeList li{border-top:1px solid var(--dsw-alias-border-l3,#d9dce1);justify-content:space-between;gap:16px;padding:12px 0;display:flex}.Fc_jqa_worktreeList li>div{min-width:0;display:grid}.Fc_jqa_success{color:var(--dsw-alias-state-success-primary,#0a7a45)}.Fc_jqa_error{color:var(--dsw-alias-state-error-primary,#c62828)}@media (width<=1000px){.Fc_jqa_split{grid-template-columns:1fr}.Fc_jqa_detail{border-top:1px solid var(--dsw-alias-border-l3,#d9dce1);border-left:0;padding-top:16px;padding-left:0}}@media (width<=640px){.Fc_jqa_page{padding:16px 12px}.Fc_jqa_header{flex-direction:column;align-items:flex-start}.Fc_jqa_headerActions{justify-content:flex-start}.Fc_jqa_table th:nth-child(n+3),.Fc_jqa_table td:nth-child(n+3){display:none}.Fc_jqa_table th:first-child{width:52%}.Fc_jqa_table th:nth-child(2){width:48%}.Fc_jqa_toolbar>span:first-child{width:100%}.Fc_jqa_resultCount{margin-left:0}}@media (prefers-reduced-motion:reduce){.Fc_jqa_page *{scroll-behavior:auto;transition:none}}";
|
|
6007
6008
|
const tagId$1 = "@canhta/dsh-autopilot/operations.module.css";
|
|
6008
6009
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
6009
6010
|
const element = document.createElement("style");
|
|
@@ -6013,40 +6014,40 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6013
6014
|
document.head.appendChild(element);
|
|
6014
6015
|
}
|
|
6015
6016
|
var operations_module_css_default = {
|
|
6016
|
-
"
|
|
6017
|
-
"
|
|
6018
|
-
"
|
|
6019
|
-
"
|
|
6020
|
-
"
|
|
6021
|
-
"
|
|
6022
|
-
"
|
|
6023
|
-
"
|
|
6024
|
-
"
|
|
6025
|
-
"
|
|
6026
|
-
"
|
|
6027
|
-
"
|
|
6028
|
-
"
|
|
6029
|
-
"
|
|
6030
|
-
"
|
|
6031
|
-
"
|
|
6032
|
-
"
|
|
6033
|
-
"
|
|
6034
|
-
"
|
|
6035
|
-
"
|
|
6036
|
-
"
|
|
6037
|
-
"
|
|
6038
|
-
"
|
|
6039
|
-
"
|
|
6040
|
-
"
|
|
6041
|
-
"
|
|
6042
|
-
"
|
|
6043
|
-
"
|
|
6044
|
-
"
|
|
6045
|
-
"
|
|
6046
|
-
"
|
|
6047
|
-
"
|
|
6048
|
-
"
|
|
6049
|
-
"
|
|
6017
|
+
"checkbox": "Fc_jqa_checkbox",
|
|
6018
|
+
"worktreeList": "Fc_jqa_worktreeList",
|
|
6019
|
+
"header": "Fc_jqa_header",
|
|
6020
|
+
"toolbar": "Fc_jqa_toolbar",
|
|
6021
|
+
"listRegion": "Fc_jqa_listRegion",
|
|
6022
|
+
"table": "Fc_jqa_table",
|
|
6023
|
+
"resultCount": "Fc_jqa_resultCount",
|
|
6024
|
+
"empty": "Fc_jqa_empty",
|
|
6025
|
+
"resource": "Fc_jqa_resource",
|
|
6026
|
+
"split": "Fc_jqa_split",
|
|
6027
|
+
"runLink": "Fc_jqa_runLink",
|
|
6028
|
+
"summary": "Fc_jqa_summary",
|
|
6029
|
+
"content": "Fc_jqa_content",
|
|
6030
|
+
"error": "Fc_jqa_error",
|
|
6031
|
+
"attention": "Fc_jqa_attention",
|
|
6032
|
+
"reason": "Fc_jqa_reason",
|
|
6033
|
+
"command": "Fc_jqa_command",
|
|
6034
|
+
"stateLabel": "Fc_jqa_stateLabel",
|
|
6035
|
+
"headerActions": "Fc_jqa_headerActions",
|
|
6036
|
+
"detail": "Fc_jqa_detail",
|
|
6037
|
+
"runsOnly": "Fc_jqa_runsOnly",
|
|
6038
|
+
"detailHeader": "Fc_jqa_detailHeader",
|
|
6039
|
+
"tableScroll": "Fc_jqa_tableScroll",
|
|
6040
|
+
"page": "Fc_jqa_page",
|
|
6041
|
+
"activeTab": "Fc_jqa_activeTab",
|
|
6042
|
+
"numeric": "Fc_jqa_numeric",
|
|
6043
|
+
"timeline": "Fc_jqa_timeline",
|
|
6044
|
+
"blocker": "Fc_jqa_blocker",
|
|
6045
|
+
"tabs": "Fc_jqa_tabs",
|
|
6046
|
+
"longText": "Fc_jqa_longText",
|
|
6047
|
+
"success": "Fc_jqa_success",
|
|
6048
|
+
"notice": "Fc_jqa_notice",
|
|
6049
|
+
"connectionNotice": "Fc_jqa_connectionNotice",
|
|
6050
|
+
"detailActions": "Fc_jqa_detailActions"
|
|
6050
6051
|
};
|
|
6051
6052
|
//#endregion
|
|
6052
6053
|
//#region src/client/OperationsAtoms.tsx
|
|
@@ -6751,8 +6752,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6751
6752
|
return state.command?.status === "pending" || state.command?.status === "accepted" || state.command?.status === "in-progress";
|
|
6752
6753
|
}
|
|
6753
6754
|
//#endregion
|
|
6754
|
-
//#region \0dsh-autopilot-css:/
|
|
6755
|
-
const css = ".
|
|
6755
|
+
//#region \0dsh-autopilot-css:/home/runner/work/dsh-autopilot/dsh-autopilot/src/client/settings.module.css.mjs
|
|
6756
|
+
const css = ".Rycwsq_settings{max-width:920px;color:var(--dsw-alias-label-primary,#202124);padding:0 8px 24px;font-size:14px}.Rycwsq_settings h2{margin:0;font-size:20px;line-height:1.3}.Rycwsq_settings>p,.Rycwsq_providerCard p,.Rycwsq_gap{color:var(--dsw-alias-label-secondary,#5f6368)}.Rycwsq_settings fieldset{border:1px solid var(--dsw-alias-border-l3,#d9dce1);border-radius:10px;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:20px 0;padding:16px;display:grid}.Rycwsq_settings legend{padding:0 6px;font-weight:600}.Rycwsq_settings label{gap:6px;display:grid}.Rycwsq_settings select{border:1px solid var(--dsw-alias-border-l4,#c7cbd1);color:inherit;background:var(--dsw-alias-bg-layer-1,#fff);border-radius:8px;padding:0 10px}.Rycwsq_settings label>select,.Rycwsq_settings input{width:100%;min-height:34px}.Rycwsq_notice,.Rycwsq_fullWidth{grid-column:1/-1}.Rycwsq_notice,.Rycwsq_gap{border:1px solid var(--dsw-alias-border-l3,#d9dce1);background:var(--dsw-alias-bg-layer-2,#f7f8fa);border-radius:8px;margin:8px 0;padding:10px 12px}.Rycwsq_gap{border-color:var(--dsw-alias-state-warn-primary,#a15c00)}.Rycwsq_providerCard{border:1px solid var(--dsw-alias-border-l3,#d9dce1);background:var(--dsw-alias-bg-layer-2,#f7f8fa);border-radius:8px;padding:12px}.Rycwsq_providerCard>div:first-child,.Rycwsq_settingsFooter,.Rycwsq_credentialActions{align-items:center;gap:8px;display:flex}.Rycwsq_providerCard h3{margin:0 auto 0 0;font-size:15px}.Rycwsq_providerCard dl{gap:3px;margin:12px 0;display:grid}.Rycwsq_providerCard dt{color:var(--dsw-alias-label-secondary,#5f6368)}.Rycwsq_providerCard dd{overflow-wrap:anywhere;margin:0 0 6px}.Rycwsq_credential{border-top:1px solid var(--dsw-alias-border-l3,#d9dce1);gap:8px;padding-top:12px;display:grid}.Rycwsq_settings .Rycwsq_checkboxLabel{flex-direction:row;align-items:center;gap:8px;display:flex}.Rycwsq_checkboxLabel input[type=checkbox]{width:auto;min-height:auto;margin:0}.Rycwsq_notificationList{gap:12px;display:grid}.Rycwsq_notificationRow{border:1px solid var(--dsw-alias-border-l3,#d9dce1);background:var(--dsw-alias-bg-layer-2,#f7f8fa);border-radius:8px;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px;display:grid}.Rycwsq_settings .Rycwsq_eventChoices{border:0;flex-wrap:wrap;grid-column:1/-1;gap:8px 16px;margin:0;padding:0;display:flex}.Rycwsq_eventChoices legend{width:100%;padding:0;font-weight:400}.Rycwsq_settingsFooter{flex-wrap:wrap}.Rycwsq_success{color:var(--dsw-alias-state-success-primary,#0a7a45)}.Rycwsq_error{color:var(--dsw-alias-state-error-primary,#c62828)}@media (width<=640px){.Rycwsq_settings fieldset{grid-template-columns:1fr}.Rycwsq_notice,.Rycwsq_fullWidth{grid-column:auto}.Rycwsq_notificationRow{grid-template-columns:1fr}.Rycwsq_eventChoices{grid-column:auto}}@media (prefers-reduced-motion:reduce){.Rycwsq_settings *{scroll-behavior:auto;transition:none}}";
|
|
6756
6757
|
const tagId = "@canhta/dsh-autopilot/settings.module.css";
|
|
6757
6758
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
6758
6759
|
const element = document.createElement("style");
|
|
@@ -6762,21 +6763,20 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6762
6763
|
document.head.appendChild(element);
|
|
6763
6764
|
}
|
|
6764
6765
|
var settings_module_css_default = {
|
|
6765
|
-
"fullWidth": "
|
|
6766
|
-
"
|
|
6767
|
-
"
|
|
6768
|
-
"
|
|
6769
|
-
"
|
|
6770
|
-
"
|
|
6771
|
-
"
|
|
6772
|
-
"
|
|
6773
|
-
"gap": "
|
|
6774
|
-
"
|
|
6775
|
-
"
|
|
6776
|
-
"
|
|
6777
|
-
"
|
|
6778
|
-
"
|
|
6779
|
-
"credential": "gRqt2a_credential"
|
|
6766
|
+
"fullWidth": "Rycwsq_fullWidth",
|
|
6767
|
+
"notificationList": "Rycwsq_notificationList",
|
|
6768
|
+
"notice": "Rycwsq_notice",
|
|
6769
|
+
"checkboxLabel": "Rycwsq_checkboxLabel",
|
|
6770
|
+
"eventChoices": "Rycwsq_eventChoices",
|
|
6771
|
+
"success": "Rycwsq_success",
|
|
6772
|
+
"providerCard": "Rycwsq_providerCard",
|
|
6773
|
+
"settingsFooter": "Rycwsq_settingsFooter",
|
|
6774
|
+
"gap": "Rycwsq_gap",
|
|
6775
|
+
"credential": "Rycwsq_credential",
|
|
6776
|
+
"error": "Rycwsq_error",
|
|
6777
|
+
"credentialActions": "Rycwsq_credentialActions",
|
|
6778
|
+
"notificationRow": "Rycwsq_notificationRow",
|
|
6779
|
+
"settings": "Rycwsq_settings"
|
|
6780
6780
|
};
|
|
6781
6781
|
//#endregion
|
|
6782
6782
|
//#region src/client/SettingsCapabilitySections.tsx
|
|
@@ -7070,6 +7070,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7070
7070
|
const [tests, setTests] = (0, react.useState)({});
|
|
7071
7071
|
const testRequests = (0, react.useRef)(/* @__PURE__ */ new Map());
|
|
7072
7072
|
const codeHostProviderInputId = (0, react.useId)();
|
|
7073
|
+
const activeProvider = providers.find((provider) => provider.id === selectedProvider);
|
|
7073
7074
|
(0, react.useEffect)(() => () => {
|
|
7074
7075
|
for (const request of testRequests.current.values()) request.abort();
|
|
7075
7076
|
testRequests.current.clear();
|
|
@@ -7150,29 +7151,23 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7150
7151
|
className: settings_module_css_default.notice,
|
|
7151
7152
|
children: t("mcpNotice")
|
|
7152
7153
|
}),
|
|
7153
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("
|
|
7154
|
-
className: settings_module_css_default.
|
|
7155
|
-
children: providers.map((provider) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProviderCard, {
|
|
7156
|
-
provider,
|
|
7157
|
-
selected: provider.id === selectedProvider,
|
|
7158
|
-
test: tests[provider.id],
|
|
7159
|
-
credentials,
|
|
7160
|
-
onTest: () => testProvider(provider),
|
|
7161
|
-
onSetCredential,
|
|
7162
|
-
onUnsetCredential,
|
|
7163
|
-
t
|
|
7164
|
-
}, provider.id))
|
|
7165
|
-
}),
|
|
7166
|
-
providers.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
7167
|
-
className: settings_module_css_default.gap,
|
|
7154
|
+
activeProvider === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
7155
|
+
className: `${settings_module_css_default.gap} ${settings_module_css_default.fullWidth}`,
|
|
7168
7156
|
children: t("configureHint")
|
|
7169
|
-
}) :
|
|
7157
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProviderCard, {
|
|
7158
|
+
provider: activeProvider,
|
|
7159
|
+
test: tests[activeProvider.id],
|
|
7160
|
+
credentials,
|
|
7161
|
+
onTest: () => testProvider(activeProvider),
|
|
7162
|
+
onSetCredential,
|
|
7163
|
+
onUnsetCredential,
|
|
7164
|
+
t
|
|
7165
|
+
})
|
|
7170
7166
|
] });
|
|
7171
7167
|
}
|
|
7172
|
-
function ProviderCard({ provider,
|
|
7168
|
+
function ProviderCard({ provider, test, credentials, onTest, onSetCredential, onUnsetCredential, t }) {
|
|
7173
7169
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", {
|
|
7174
|
-
className: settings_module_css_default.providerCard
|
|
7175
|
-
"data-selected": selected ? "true" : void 0,
|
|
7170
|
+
className: `${settings_module_css_default.providerCard} ${settings_module_css_default.fullWidth}`,
|
|
7176
7171
|
children: [
|
|
7177
7172
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: provider.displayName }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
7178
7173
|
tone: provider.availability === "available" ? "success" : "danger",
|