dsh-loop-engine 0.1.5-rc1
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 +125 -0
- package/README.zh.md +53 -0
- package/cordis.patch.yml +3 -0
- package/lib/client.js +675 -0
- package/lib/index.js +6821 -0
- package/lib/invariant.js +108 -0
- package/lib/types/client/LoopEngineBadge.d.ts +34 -0
- package/lib/types/client/LoopEngineComposerSelect.d.ts +40 -0
- package/lib/types/client/LoopEngineSection.d.ts +34 -0
- package/lib/types/client/index.d.ts +29 -0
- package/lib/types/client/locales.d.ts +46 -0
- package/lib/types/client/store.d.ts +58 -0
- package/lib/types/commands.d.ts +69 -0
- package/lib/types/driver-core/assistant-stream.d.ts +68 -0
- package/lib/types/driver-core/context-files.d.ts +62 -0
- package/lib/types/driver-core/inbox.d.ts +104 -0
- package/lib/types/driver-core/ownership.d.ts +40 -0
- package/lib/types/driver-core/permission-knobs.d.ts +26 -0
- package/lib/types/driver-core/prompt.d.ts +23 -0
- package/lib/types/driver-core/skill-inject.d.ts +59 -0
- package/lib/types/engine-claude/agent.d.ts +106 -0
- package/lib/types/engine-claude/loop.d.ts +111 -0
- package/lib/types/engine-claude/mapping.d.ts +83 -0
- package/lib/types/engine-claude/permission.d.ts +41 -0
- package/lib/types/engine-claude/process.d.ts +59 -0
- package/lib/types/engine-claude/sdk.d.ts +57 -0
- package/lib/types/engine-claude/types.d.ts +18 -0
- package/lib/types/engine-codex/agent.d.ts +113 -0
- package/lib/types/engine-codex/appserver/client.d.ts +49 -0
- package/lib/types/engine-codex/appserver/mapping.d.ts +67 -0
- package/lib/types/engine-codex/appserver/thread.d.ts +66 -0
- package/lib/types/engine-codex/appserver/types.d.ts +215 -0
- package/lib/types/engine-codex/loop.d.ts +114 -0
- package/lib/types/engine-codex/permission.d.ts +32 -0
- package/lib/types/engine-codex/skills.d.ts +29 -0
- package/lib/types/engine-codex/types.d.ts +19 -0
- package/lib/types/engine-kimi/acp/client.d.ts +76 -0
- package/lib/types/engine-kimi/acp/mapping.d.ts +44 -0
- package/lib/types/engine-kimi/acp/types.d.ts +95 -0
- package/lib/types/engine-kimi/agent.d.ts +130 -0
- package/lib/types/engine-kimi/commands.d.ts +40 -0
- package/lib/types/engine-kimi/loop.d.ts +108 -0
- package/lib/types/engine-kimi/mapping.d.ts +71 -0
- package/lib/types/engine-kimi/permission.d.ts +28 -0
- package/lib/types/engine-kimi/process.d.ts +61 -0
- package/lib/types/engine-kimi/skills.d.ts +57 -0
- package/lib/types/engine-kimi/types.d.ts +23 -0
- package/lib/types/engine-pi/agent.d.ts +150 -0
- package/lib/types/engine-pi/loop.d.ts +125 -0
- package/lib/types/engine-pi/permission.d.ts +43 -0
- package/lib/types/engine-pi/probe.d.ts +23 -0
- package/lib/types/engine-pi/rpc/client.d.ts +105 -0
- package/lib/types/engine-pi/rpc/mapping.d.ts +37 -0
- package/lib/types/engine-pi/rpc/types.d.ts +235 -0
- package/lib/types/engine-pi/skills.d.ts +55 -0
- package/lib/types/engine-pi/types.d.ts +27 -0
- package/lib/types/index.d.ts +114 -0
- package/lib/types/invariant.d.ts +23 -0
- package/lib/types/namespace.d.ts +9 -0
- package/lib/types/patch-manager.d.ts +59 -0
- package/lib/types/preset.d.ts +73 -0
- package/lib/types/provider-route.d.ts +49 -0
- package/lib/types/settings.d.ts +31 -0
- package/lib/types/skills.d.ts +93 -0
- package/package.json +104 -0
package/lib/client.js
ADDED
|
@@ -0,0 +1,675 @@
|
|
|
1
|
+
var module = { exports: {} }; var exports = module.exports; window.__ModuleLoader__.load({ id: "dsh-loop-engine", factory: (require) => {
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/client/index.ts
|
|
22
|
+
var index_exports = {};
|
|
23
|
+
__export(index_exports, {
|
|
24
|
+
apply: () => apply,
|
|
25
|
+
inject: () => inject
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(index_exports);
|
|
28
|
+
|
|
29
|
+
// src/client/LoopEngineSection.tsx
|
|
30
|
+
var import_react = require("react");
|
|
31
|
+
var import_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
32
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
|
+
var ENGINE_OPTIONS = [
|
|
34
|
+
{ value: "in-process", key: "engineInProcess" },
|
|
35
|
+
{ value: "claude-code", key: "engineClaudeCode" },
|
|
36
|
+
{ value: "codex", key: "engineCodex" },
|
|
37
|
+
{ value: "pi", key: "enginePi" },
|
|
38
|
+
{ value: "kimi", key: "engineKimi" }
|
|
39
|
+
];
|
|
40
|
+
function engineLabelKey(engine) {
|
|
41
|
+
switch (engine) {
|
|
42
|
+
case "claude-code":
|
|
43
|
+
return "engineClaudeCode";
|
|
44
|
+
case "codex":
|
|
45
|
+
return "engineCodex";
|
|
46
|
+
case "pi":
|
|
47
|
+
return "enginePi";
|
|
48
|
+
case "kimi":
|
|
49
|
+
return "engineKimi";
|
|
50
|
+
default:
|
|
51
|
+
return "engineInProcess";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
var shell = {
|
|
55
|
+
display: "flex",
|
|
56
|
+
flexDirection: "column",
|
|
57
|
+
gap: 12,
|
|
58
|
+
maxWidth: 720,
|
|
59
|
+
color: "var(--dsw-alias-label-primary)"
|
|
60
|
+
};
|
|
61
|
+
var titleStyle = {
|
|
62
|
+
margin: 0,
|
|
63
|
+
fontSize: 18,
|
|
64
|
+
fontWeight: 600
|
|
65
|
+
};
|
|
66
|
+
var intro = {
|
|
67
|
+
margin: 0,
|
|
68
|
+
fontSize: 13,
|
|
69
|
+
color: "var(--dsw-alias-label-tertiary)"
|
|
70
|
+
};
|
|
71
|
+
var trigger = {
|
|
72
|
+
appearance: "none",
|
|
73
|
+
boxSizing: "border-box",
|
|
74
|
+
display: "inline-flex",
|
|
75
|
+
alignItems: "center",
|
|
76
|
+
gap: 8,
|
|
77
|
+
width: "fit-content",
|
|
78
|
+
minWidth: 200,
|
|
79
|
+
padding: "9px 12px",
|
|
80
|
+
border: "1px solid var(--dsw-alias-border-l2)",
|
|
81
|
+
borderRadius: 10,
|
|
82
|
+
background: "var(--dsw-alias-bg-layer-1)",
|
|
83
|
+
color: "var(--dsw-alias-label-primary)",
|
|
84
|
+
font: "inherit",
|
|
85
|
+
fontSize: 13,
|
|
86
|
+
cursor: "pointer"
|
|
87
|
+
};
|
|
88
|
+
var triggerDisabled = { ...trigger, opacity: 0.5, cursor: "default" };
|
|
89
|
+
var notice = {
|
|
90
|
+
margin: 0,
|
|
91
|
+
fontSize: 12,
|
|
92
|
+
color: "var(--dsw-alias-label-secondary)"
|
|
93
|
+
};
|
|
94
|
+
var error = {
|
|
95
|
+
margin: 0,
|
|
96
|
+
fontSize: 13,
|
|
97
|
+
color: "var(--dsw-alias-state-error-primary)"
|
|
98
|
+
};
|
|
99
|
+
var toggleRow = {
|
|
100
|
+
display: "flex",
|
|
101
|
+
alignItems: "center",
|
|
102
|
+
gap: 8,
|
|
103
|
+
fontSize: 13,
|
|
104
|
+
color: "var(--dsw-alias-label-primary)",
|
|
105
|
+
cursor: "pointer"
|
|
106
|
+
};
|
|
107
|
+
var toggleCheckbox = {
|
|
108
|
+
width: 16,
|
|
109
|
+
height: 16,
|
|
110
|
+
accentColor: "var(--dsw-alias-brand-primary, var(--dsw-alias-label-primary))",
|
|
111
|
+
cursor: "pointer"
|
|
112
|
+
};
|
|
113
|
+
var confirmBody = {
|
|
114
|
+
margin: 0,
|
|
115
|
+
fontSize: 13,
|
|
116
|
+
lineHeight: 1.55,
|
|
117
|
+
color: "var(--dsw-alias-label-secondary)"
|
|
118
|
+
};
|
|
119
|
+
function LoopEngineSection(props) {
|
|
120
|
+
const { controller, useSnapshot, t } = props;
|
|
121
|
+
const { status, engine, showInComposer, writable } = useSnapshot((snapshot) => snapshot);
|
|
122
|
+
const [open, setOpen] = (0, import_react.useState)(false);
|
|
123
|
+
const [pending, setPending] = (0, import_react.useState)(null);
|
|
124
|
+
const navId = (0, import_react.useId)();
|
|
125
|
+
const triggerRef = (0, import_react.useRef)(null);
|
|
126
|
+
if (status === "unavailable") {
|
|
127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { "aria-labelledby": navId, style: shell, children: [
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { id: navId, style: titleStyle, children: t("nav") }),
|
|
129
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { style: intro, children: t("description") }),
|
|
130
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { role: "alert", style: error, children: t("unavailable") })
|
|
131
|
+
] });
|
|
132
|
+
}
|
|
133
|
+
const disabled = status === "saving" || !writable;
|
|
134
|
+
const label = t(engineLabelKey(engine));
|
|
135
|
+
const onSelect = (next) => {
|
|
136
|
+
setOpen(false);
|
|
137
|
+
const value = next;
|
|
138
|
+
if (value === engine) return;
|
|
139
|
+
setPending(value);
|
|
140
|
+
};
|
|
141
|
+
const confirmSwitch = () => {
|
|
142
|
+
const value = pending;
|
|
143
|
+
setPending(null);
|
|
144
|
+
if (value !== null) {
|
|
145
|
+
void controller.setEngine(value).then((landed) => {
|
|
146
|
+
if (landed) window.location.reload();
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
const cancelSwitch = () => {
|
|
151
|
+
setPending(null);
|
|
152
|
+
};
|
|
153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { "aria-labelledby": navId, style: shell, children: [
|
|
154
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { id: navId, style: titleStyle, children: t("nav") }),
|
|
155
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { style: intro, children: t("description") }),
|
|
156
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
157
|
+
import_dsh_client_ui_primitives.Menu,
|
|
158
|
+
{
|
|
159
|
+
open,
|
|
160
|
+
onClose: () => {
|
|
161
|
+
setOpen(false);
|
|
162
|
+
},
|
|
163
|
+
items: ENGINE_OPTIONS.map((option) => ({ id: option.value, label: t(option.key) })),
|
|
164
|
+
selectedId: engine,
|
|
165
|
+
onSelect,
|
|
166
|
+
align: "start",
|
|
167
|
+
portal: true,
|
|
168
|
+
getAnchorRect: () => triggerRef.current?.getBoundingClientRect() ?? null,
|
|
169
|
+
anchor: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
170
|
+
"button",
|
|
171
|
+
{
|
|
172
|
+
type: "button",
|
|
173
|
+
ref: triggerRef,
|
|
174
|
+
"aria-haspopup": "menu",
|
|
175
|
+
"aria-expanded": open,
|
|
176
|
+
disabled,
|
|
177
|
+
style: disabled ? triggerDisabled : trigger,
|
|
178
|
+
onClick: () => {
|
|
179
|
+
setOpen(!open);
|
|
180
|
+
},
|
|
181
|
+
children: [
|
|
182
|
+
label,
|
|
183
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.IconChevronDownOutline14, { size: 14 })
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
)
|
|
187
|
+
}
|
|
188
|
+
),
|
|
189
|
+
status === "saving" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { style: notice, children: t("saving") }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { style: notice, children: t("switchNotice") }),
|
|
190
|
+
engine === "claude-code" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { style: notice, children: t("claudeModelNotice") }) : null,
|
|
191
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { style: toggleRow, children: [
|
|
192
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
193
|
+
"input",
|
|
194
|
+
{
|
|
195
|
+
type: "checkbox",
|
|
196
|
+
checked: showInComposer,
|
|
197
|
+
disabled,
|
|
198
|
+
style: toggleCheckbox,
|
|
199
|
+
onChange: (event) => {
|
|
200
|
+
void controller.setShowInComposer(event.currentTarget.checked);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
),
|
|
204
|
+
t("showInComposerLabel")
|
|
205
|
+
] }),
|
|
206
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
207
|
+
import_dsh_client_ui_primitives.Modal,
|
|
208
|
+
{
|
|
209
|
+
open: pending !== null,
|
|
210
|
+
onClose: cancelSwitch,
|
|
211
|
+
title: t("confirmTitle"),
|
|
212
|
+
closeLabel: t("closeLabel"),
|
|
213
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
214
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.Button, { variant: "outline", onClick: cancelSwitch, children: t("cancelAction") }),
|
|
215
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.Button, { variant: "primary", onClick: confirmSwitch, children: t("confirmAction") })
|
|
216
|
+
] }),
|
|
217
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { style: confirmBody, children: t("confirmBody") })
|
|
218
|
+
}
|
|
219
|
+
)
|
|
220
|
+
] });
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// src/client/LoopEngineBadge.tsx
|
|
224
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
225
|
+
var pill = {
|
|
226
|
+
display: "inline-flex",
|
|
227
|
+
alignItems: "center",
|
|
228
|
+
gap: 4,
|
|
229
|
+
padding: "2px 8px",
|
|
230
|
+
border: "1px solid var(--dsw-alias-border-l2)",
|
|
231
|
+
borderRadius: 999,
|
|
232
|
+
background: "var(--dsw-alias-bg-layer-1)",
|
|
233
|
+
color: "var(--dsw-alias-label-secondary)",
|
|
234
|
+
fontSize: 12,
|
|
235
|
+
lineHeight: "18px",
|
|
236
|
+
whiteSpace: "nowrap"
|
|
237
|
+
};
|
|
238
|
+
function LoopEngineBadge(props) {
|
|
239
|
+
const { useSnapshot, t } = props;
|
|
240
|
+
const { status, engine } = useSnapshot((state) => state);
|
|
241
|
+
if (status !== "ready") return null;
|
|
242
|
+
const label = t(
|
|
243
|
+
engine === "claude-code" ? "engineClaudeCode" : engine === "codex" ? "engineCodex" : engine === "pi" ? "enginePi" : engine === "kimi" ? "engineKimi" : "engineInProcess"
|
|
244
|
+
);
|
|
245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { style: pill, title: t("description"), children: [
|
|
246
|
+
t("nav"),
|
|
247
|
+
" \xB7 ",
|
|
248
|
+
label
|
|
249
|
+
] });
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// src/client/LoopEngineComposerSelect.tsx
|
|
253
|
+
var import_react2 = require("react");
|
|
254
|
+
var import_dsh_client_ui_primitives2 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
255
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
256
|
+
var ENGINE_OPTIONS2 = [
|
|
257
|
+
{ value: "in-process", key: "engineInProcess" },
|
|
258
|
+
{ value: "claude-code", key: "engineClaudeCode" },
|
|
259
|
+
{ value: "codex", key: "engineCodex" },
|
|
260
|
+
{ value: "pi", key: "enginePi" },
|
|
261
|
+
{ value: "kimi", key: "engineKimi" }
|
|
262
|
+
];
|
|
263
|
+
function engineLabelKey2(engine) {
|
|
264
|
+
switch (engine) {
|
|
265
|
+
case "claude-code":
|
|
266
|
+
return "engineClaudeCode";
|
|
267
|
+
case "codex":
|
|
268
|
+
return "engineCodex";
|
|
269
|
+
case "pi":
|
|
270
|
+
return "enginePi";
|
|
271
|
+
case "kimi":
|
|
272
|
+
return "engineKimi";
|
|
273
|
+
default:
|
|
274
|
+
return "engineInProcess";
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
function engineGlyph(engine, size = 16) {
|
|
278
|
+
switch (engine) {
|
|
279
|
+
case "claude-code":
|
|
280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { fill: "currentColor", d: "M21 10.5h3v3h-3v3h-1.5v3H18v-3h-1.5v3H15v-3H9v3H7.5v-3H6v3H4.5v-3H3v-3H0v-3h3v-6h18Zm-15 0h1.5v-3H6Zm10.5 0H18v-3h-1.5z" }) });
|
|
281
|
+
case "codex":
|
|
282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { width: size, height: size, viewBox: "0 0 256 260", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { fill: "currentColor", d: "M239.183914,106.202783 C245.054304,88.5242096 243.02228,69.1733805 233.607599,53.0998864 C219.451678,28.4588021 190.999703,15.7836129 163.213007,21.739505 C147.554077,4.32145883 123.794909,-3.42398554 100.87901,1.41873898 C77.9631105,6.26146349 59.3690093,22.9572536 52.0959621,45.2214219 C33.8436494,48.9644867 18.0901721,60.392749 8.86672513,76.5818033 C-5.443491,101.182962 -2.19544431,132.215255 16.8986662,153.320094 C11.0060865,170.990656 13.0197283,190.343991 22.4238231,206.422991 C36.5975553,231.072344 65.0680342,243.746566 92.8695738,237.783372 C105.235639,251.708249 123.001113,259.630942 141.623968,259.52692 C170.105359,259.552169 195.337611,241.165718 204.037777,214.045661 C222.28734,210.296356 238.038489,198.869783 247.267014,182.68528 C261.404453,158.127515 258.142494,127.262775 239.183914,106.202783 L239.183914,106.202783 Z M141.623968,242.541207 C130.255682,242.559177 119.243876,238.574642 110.519381,231.286197 L112.054146,230.416496 L163.724595,200.590881 C166.340648,199.056444 167.954321,196.256818 167.970781,193.224005 L167.970781,120.373788 L189.815614,133.010026 C190.034132,133.121423 190.186235,133.330564 190.224885,133.572774 L190.224885,193.940229 C190.168603,220.758427 168.442166,242.484864 141.623968,242.541207 Z M37.1575749,197.93062 C31.456498,188.086359 29.4094818,176.546984 31.3766237,165.342426 L32.9113895,166.263285 L84.6329973,196.088901 C87.2389349,197.618207 90.4682717,197.618207 93.0742093,196.088901 L156.255402,159.663793 L156.255402,184.885111 C156.243557,185.149771 156.111725,185.394602 155.89729,185.550176 L103.561776,215.733903 C80.3054953,229.131632 50.5924954,221.165435 37.1575749,197.93062 Z M23.5493181,85.3811273 C29.2899861,75.4733097 38.3511911,67.9162648 49.1287482,64.0478825 L49.1287482,125.438515 C49.0891492,128.459425 50.6965386,131.262556 53.3237748,132.754232 L116.198014,169.025864 L94.3531808,181.662102 C94.1132325,181.789434 93.8257461,181.789434 93.5857979,181.662102 L41.3526015,151.529534 C18.1419426,138.076098 10.1817681,108.385562 23.5493181,85.125333 L23.5493181,85.3811273 Z M203.0146,127.075598 L139.935725,90.4458545 L161.7294,77.8607748 C161.969348,77.7334434 162.256834,77.7334434 162.496783,77.8607748 L214.729979,108.044502 C231.032329,117.451747 240.437294,135.426109 238.871504,154.182739 C237.305714,172.939368 225.050719,189.105572 207.414262,195.67963 L207.414262,134.288998 C207.322521,131.276867 205.650697,128.535853 203.0146,127.075598 Z M224.757116,94.3850867 L223.22235,93.4642272 L171.60306,63.3828173 C168.981293,61.8443751 165.732456,61.8443751 163.110689,63.3828173 L99.9806554,99.8079259 L99.9806554,74.5866077 C99.9533004,74.3254088 100.071095,74.0701869 100.287609,73.9215426 L152.520805,43.7889738 C168.863098,34.3743518 189.174256,35.2529043 204.642579,46.0434841 C220.110903,56.8340638 227.949269,75.5923959 224.757116,94.1804513 L224.757116,94.3850867 Z M88.0606409,139.097931 L66.2158076,126.512851 C65.9950399,126.379091 65.8450965,126.154176 65.8065367,125.898945 L65.8065367,65.684966 C65.8314495,46.8285367 76.7500605,29.6846032 93.8270852,21.6883055 C110.90411,13.6920079 131.063833,16.2835462 145.5632,28.338998 L144.028434,29.2086986 L92.3579852,59.0343142 C89.7419327,60.5687513 88.1282597,63.3683767 88.1117998,66.4011901 L88.0606409,139.097931 Z M99.9294965,113.5185 L128.06687,97.3011417 L156.255402,113.5185 L156.255402,145.953218 L128.169187,162.170577 L99.9806554,145.953218 L99.9294965,113.5185 Z" }) });
|
|
283
|
+
case "pi":
|
|
284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("svg", { width: size, height: size, viewBox: "0 0 800 800", fill: "none", "aria-hidden": true, children: [
|
|
285
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { fill: "currentColor", fillRule: "evenodd", d: "M165.29 165.29H517.36V400H400V517.36H282.65V634.72H165.29ZM282.65 282.65V400H400V282.65Z" }),
|
|
286
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { fill: "currentColor", d: "M517.36 400H634.72V634.72H517.36Z" })
|
|
287
|
+
] });
|
|
288
|
+
case "kimi":
|
|
289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { fill: "currentColor", d: "M6 3h2.6v6.5L14.4 3h3.4l-5.6 7.4L17.8 21h-3.4l-5.9-8v8H6z" }) });
|
|
290
|
+
default:
|
|
291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives2.FishLogo, { size });
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
var trigger2 = {
|
|
295
|
+
appearance: "none",
|
|
296
|
+
boxSizing: "border-box",
|
|
297
|
+
display: "inline-flex",
|
|
298
|
+
alignItems: "center",
|
|
299
|
+
gap: 4,
|
|
300
|
+
minWidth: 0,
|
|
301
|
+
maxWidth: 220,
|
|
302
|
+
height: 28,
|
|
303
|
+
padding: "0 4px 0 8px",
|
|
304
|
+
border: "none",
|
|
305
|
+
borderRadius: 24,
|
|
306
|
+
outline: "none",
|
|
307
|
+
background: "transparent",
|
|
308
|
+
color: "var(--dsw-alias-label-secondary)",
|
|
309
|
+
font: "inherit",
|
|
310
|
+
fontSize: 13,
|
|
311
|
+
lineHeight: "20px",
|
|
312
|
+
fontWeight: 500,
|
|
313
|
+
cursor: "pointer"
|
|
314
|
+
};
|
|
315
|
+
var triggerHover = { ...trigger2, background: "var(--dsw-alias-interactive-bg-hover)" };
|
|
316
|
+
var triggerDisabled2 = { ...trigger2, color: "var(--dsw-alias-label-dimmed)", cursor: "default" };
|
|
317
|
+
var triggerIcon = {
|
|
318
|
+
display: "inline-flex",
|
|
319
|
+
flex: "0 0 auto"
|
|
320
|
+
};
|
|
321
|
+
var triggerLabel = {
|
|
322
|
+
minWidth: 0,
|
|
323
|
+
overflow: "hidden",
|
|
324
|
+
textOverflow: "ellipsis",
|
|
325
|
+
whiteSpace: "nowrap"
|
|
326
|
+
};
|
|
327
|
+
var chevron = {
|
|
328
|
+
display: "inline-flex",
|
|
329
|
+
flex: "0 0 auto",
|
|
330
|
+
color: "var(--dsw-alias-label-caption)",
|
|
331
|
+
transition: "transform 120ms ease"
|
|
332
|
+
};
|
|
333
|
+
var chevronOpen = { ...chevron, transform: "rotate(180deg)" };
|
|
334
|
+
var confirmBody2 = {
|
|
335
|
+
margin: 0,
|
|
336
|
+
fontSize: 13,
|
|
337
|
+
lineHeight: 1.55,
|
|
338
|
+
color: "var(--dsw-alias-label-secondary)"
|
|
339
|
+
};
|
|
340
|
+
function LoopEngineComposerSelect(props) {
|
|
341
|
+
const { controller, useSnapshot, t } = props;
|
|
342
|
+
const { status, engine, showInComposer, writable } = useSnapshot((snapshot) => snapshot);
|
|
343
|
+
const [open, setOpen] = (0, import_react2.useState)(false);
|
|
344
|
+
const [hovered, setHovered] = (0, import_react2.useState)(false);
|
|
345
|
+
const [pending, setPending] = (0, import_react2.useState)(null);
|
|
346
|
+
const triggerRef = (0, import_react2.useRef)(null);
|
|
347
|
+
if (status !== "ready" || !showInComposer) return null;
|
|
348
|
+
const disabled = !writable;
|
|
349
|
+
const label = t(engineLabelKey2(engine));
|
|
350
|
+
const title = engine === "claude-code" ? t("claudeModelNotice") : t("description");
|
|
351
|
+
const onSelect = (next) => {
|
|
352
|
+
setOpen(false);
|
|
353
|
+
const value = next;
|
|
354
|
+
if (value === engine) return;
|
|
355
|
+
setPending(value);
|
|
356
|
+
};
|
|
357
|
+
const confirmSwitch = () => {
|
|
358
|
+
const value = pending;
|
|
359
|
+
setPending(null);
|
|
360
|
+
if (value !== null) {
|
|
361
|
+
void controller.setEngine(value).then((landed) => {
|
|
362
|
+
if (landed) window.location.reload();
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
const cancelSwitch = () => {
|
|
367
|
+
setPending(null);
|
|
368
|
+
};
|
|
369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
370
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
371
|
+
import_dsh_client_ui_primitives2.Menu,
|
|
372
|
+
{
|
|
373
|
+
open,
|
|
374
|
+
onClose: () => {
|
|
375
|
+
setOpen(false);
|
|
376
|
+
},
|
|
377
|
+
items: ENGINE_OPTIONS2.map((option) => ({
|
|
378
|
+
id: option.value,
|
|
379
|
+
label: t(option.key),
|
|
380
|
+
icon: engineGlyph(option.value)
|
|
381
|
+
})),
|
|
382
|
+
selectedId: engine,
|
|
383
|
+
onSelect,
|
|
384
|
+
align: "start",
|
|
385
|
+
portal: true,
|
|
386
|
+
getAnchorRect: () => triggerRef.current?.getBoundingClientRect() ?? null,
|
|
387
|
+
anchor: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
388
|
+
"button",
|
|
389
|
+
{
|
|
390
|
+
type: "button",
|
|
391
|
+
ref: triggerRef,
|
|
392
|
+
"aria-haspopup": "menu",
|
|
393
|
+
"aria-expanded": open,
|
|
394
|
+
disabled,
|
|
395
|
+
style: disabled ? triggerDisabled2 : hovered ? triggerHover : trigger2,
|
|
396
|
+
title,
|
|
397
|
+
onMouseEnter: () => {
|
|
398
|
+
setHovered(true);
|
|
399
|
+
},
|
|
400
|
+
onMouseLeave: () => {
|
|
401
|
+
setHovered(false);
|
|
402
|
+
},
|
|
403
|
+
onClick: () => {
|
|
404
|
+
setOpen(!open);
|
|
405
|
+
},
|
|
406
|
+
children: [
|
|
407
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: triggerIcon, "aria-hidden": true, children: engineGlyph(engine, 14) }),
|
|
408
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: triggerLabel, children: label }),
|
|
409
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: open ? chevronOpen : chevron, "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives2.IconChevronDownOutline14, { size: 14 }) })
|
|
410
|
+
]
|
|
411
|
+
}
|
|
412
|
+
)
|
|
413
|
+
}
|
|
414
|
+
),
|
|
415
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
416
|
+
import_dsh_client_ui_primitives2.Modal,
|
|
417
|
+
{
|
|
418
|
+
open: pending !== null,
|
|
419
|
+
onClose: cancelSwitch,
|
|
420
|
+
title: t("confirmTitle"),
|
|
421
|
+
closeLabel: t("closeLabel"),
|
|
422
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
423
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives2.Button, { variant: "outline", onClick: cancelSwitch, children: t("cancelAction") }),
|
|
424
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives2.Button, { variant: "primary", onClick: confirmSwitch, children: t("confirmAction") })
|
|
425
|
+
] }),
|
|
426
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { style: confirmBody2, children: t("confirmBody") })
|
|
427
|
+
}
|
|
428
|
+
)
|
|
429
|
+
] });
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
// src/client/store.ts
|
|
433
|
+
var import_dsh_client_store = require("@deepseek-ai/dsh-client-store");
|
|
434
|
+
function decodeLoopEngine(section) {
|
|
435
|
+
if (typeof section !== "object" || section === null || Array.isArray(section)) return void 0;
|
|
436
|
+
const { engine, showInComposer } = section;
|
|
437
|
+
if (engine !== "in-process" && engine !== "claude-code" && engine !== "codex" && engine !== "pi" && engine !== "kimi") {
|
|
438
|
+
return void 0;
|
|
439
|
+
}
|
|
440
|
+
return { engine, showInComposer: showInComposer !== false };
|
|
441
|
+
}
|
|
442
|
+
var LoopEngineStore = class {
|
|
443
|
+
/**
|
|
444
|
+
* @param scope - the loop engine settings namespace scope.
|
|
445
|
+
*/
|
|
446
|
+
constructor(scope) {
|
|
447
|
+
this.scope = scope;
|
|
448
|
+
}
|
|
449
|
+
scope;
|
|
450
|
+
/** uSES-safe state source shared by the registered settings section. */
|
|
451
|
+
store = (0, import_dsh_client_store.createSnapshotStore)({
|
|
452
|
+
status: "loading",
|
|
453
|
+
engine: "in-process",
|
|
454
|
+
showInComposer: true,
|
|
455
|
+
writable: false,
|
|
456
|
+
error: null
|
|
457
|
+
});
|
|
458
|
+
following;
|
|
459
|
+
saving = false;
|
|
460
|
+
/** Begin following the bound scope and publish its current answer. */
|
|
461
|
+
load() {
|
|
462
|
+
this.following ??= this.scope.subscribe(() => {
|
|
463
|
+
this.derive();
|
|
464
|
+
});
|
|
465
|
+
this.derive();
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* Persist the selected engine. Success is judged against the snapshot the
|
|
469
|
+
* write left behind, so a refused write reports error after its recovery.
|
|
470
|
+
* @param engine - the engine to select for future Agent turns.
|
|
471
|
+
* @returns whether the write landed.
|
|
472
|
+
*/
|
|
473
|
+
async setEngine(engine) {
|
|
474
|
+
this.saving = true;
|
|
475
|
+
this.store.update((state) => {
|
|
476
|
+
state.status = "saving";
|
|
477
|
+
state.error = null;
|
|
478
|
+
});
|
|
479
|
+
try {
|
|
480
|
+
await this.scope.set("engine", engine);
|
|
481
|
+
} finally {
|
|
482
|
+
this.saving = false;
|
|
483
|
+
}
|
|
484
|
+
this.derive();
|
|
485
|
+
const { engine: settled } = this.store.getSnapshot();
|
|
486
|
+
const landed = settled === engine;
|
|
487
|
+
if (!landed) {
|
|
488
|
+
this.store.update((state) => {
|
|
489
|
+
state.status = "unavailable";
|
|
490
|
+
state.error = "the loop engine selection did not persist";
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
return landed;
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Persist whether the composer shows the engine picker. Success is judged
|
|
497
|
+
* against the snapshot the write left behind, so a refused write reports
|
|
498
|
+
* error after its recovery. Unlike {@link setEngine}, landing does not reload
|
|
499
|
+
* the page — the toggle only changes composer visibility.
|
|
500
|
+
* @param show - whether the chat page composer reveals the engine picker.
|
|
501
|
+
* @returns whether the write landed.
|
|
502
|
+
*/
|
|
503
|
+
async setShowInComposer(show) {
|
|
504
|
+
this.saving = true;
|
|
505
|
+
this.store.update((state) => {
|
|
506
|
+
state.status = "saving";
|
|
507
|
+
state.error = null;
|
|
508
|
+
});
|
|
509
|
+
try {
|
|
510
|
+
await this.scope.set("showInComposer", show);
|
|
511
|
+
} finally {
|
|
512
|
+
this.saving = false;
|
|
513
|
+
}
|
|
514
|
+
this.derive();
|
|
515
|
+
const { showInComposer: settled } = this.store.getSnapshot();
|
|
516
|
+
const landed = settled === show;
|
|
517
|
+
if (!landed) {
|
|
518
|
+
this.store.update((state) => {
|
|
519
|
+
state.status = "unavailable";
|
|
520
|
+
state.error = "the loop engine display setting did not persist";
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
return landed;
|
|
524
|
+
}
|
|
525
|
+
/** Stop following the scope. */
|
|
526
|
+
dispose() {
|
|
527
|
+
this.following?.();
|
|
528
|
+
this.following = void 0;
|
|
529
|
+
}
|
|
530
|
+
derive() {
|
|
531
|
+
if (this.saving) return;
|
|
532
|
+
const scope = this.scope.getSnapshot();
|
|
533
|
+
switch (scope.status) {
|
|
534
|
+
case "loading":
|
|
535
|
+
this.store.update((state) => {
|
|
536
|
+
state.status = "loading";
|
|
537
|
+
state.error = null;
|
|
538
|
+
});
|
|
539
|
+
return;
|
|
540
|
+
case "unavailable":
|
|
541
|
+
this.store.update((state) => {
|
|
542
|
+
state.status = "unavailable";
|
|
543
|
+
state.engine = "in-process";
|
|
544
|
+
state.showInComposer = true;
|
|
545
|
+
state.error = null;
|
|
546
|
+
});
|
|
547
|
+
return;
|
|
548
|
+
case "ready": {
|
|
549
|
+
const engine = scope.value?.engine ?? "in-process";
|
|
550
|
+
const showInComposer = scope.value?.showInComposer ?? true;
|
|
551
|
+
this.store.update((state) => {
|
|
552
|
+
state.status = "ready";
|
|
553
|
+
state.engine = engine;
|
|
554
|
+
state.showInComposer = showInComposer;
|
|
555
|
+
state.writable = scope.writable;
|
|
556
|
+
state.error = null;
|
|
557
|
+
});
|
|
558
|
+
return;
|
|
559
|
+
}
|
|
560
|
+
default: {
|
|
561
|
+
const exhaustive = scope.status;
|
|
562
|
+
throw new Error(`unexpected loop engine scope status: ${String(exhaustive)}`);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
// src/client/locales.ts
|
|
569
|
+
var zh = {
|
|
570
|
+
nav: "\u5FAA\u73AF\u5F15\u64CE",
|
|
571
|
+
description: "\u9009\u62E9\u9A71\u52A8\u4F1A\u8BDD\u7684 Agent \u6267\u884C\u5F15\u64CE\uFF0C\u5207\u6362\u5BF9\u540E\u7EED\u4F1A\u8BDD\u751F\u6548\u3002",
|
|
572
|
+
engineInProcess: "\u8FDB\u7A0B\u5185\u5F15\u64CE\uFF08\u9ED8\u8BA4\uFF09",
|
|
573
|
+
engineClaudeCode: "Claude Code CLI",
|
|
574
|
+
engineCodex: "Codex CLI",
|
|
575
|
+
enginePi: "Pi CLI",
|
|
576
|
+
engineKimi: "Kimi Code CLI",
|
|
577
|
+
showInComposerLabel: "\u5728\u5BF9\u8BDD\u9875\u663E\u793A\u5F15\u64CE\u9009\u62E9\u5668",
|
|
578
|
+
unavailable: "\u5FAA\u73AF\u5F15\u64CE\u8BBE\u7F6E\u4E0D\u53EF\u7528",
|
|
579
|
+
switchNotice: "\u5207\u6362\u5F15\u64CE\u4F1A\u4E2D\u65AD\u5F53\u524D\u4F7F\u7528\u65E7\u5F15\u64CE\u8FD0\u884C\u4E2D\u7684\u4F1A\u8BDD\u3002",
|
|
580
|
+
saving: "\u4FDD\u5B58\u4E2D\u2026",
|
|
581
|
+
confirmTitle: "\u5207\u6362\u5FAA\u73AF\u5F15\u64CE\uFF1F",
|
|
582
|
+
confirmBody: "\u5207\u6362\u4F1A\u4E2D\u65AD\u5F53\u524D\u4F7F\u7528\u65E7\u5F15\u64CE\u8FD0\u884C\u4E2D\u7684\u4F1A\u8BDD\uFF0C\u786E\u8BA4\u540E\u9875\u9762\u5C06\u81EA\u52A8\u5237\u65B0\uFF0C\u65B0\u5BF9\u8BDD\u4F7F\u7528\u65B0\u5F15\u64CE\u3002\u786E\u8BA4\u5207\u6362\u5417\uFF1F",
|
|
583
|
+
confirmAction: "\u5207\u6362",
|
|
584
|
+
cancelAction: "\u53D6\u6D88",
|
|
585
|
+
closeLabel: "\u5173\u95ED",
|
|
586
|
+
claudeModelNotice: "\u5F53\u524D\u4F7F\u7528 Claude Code \u5F15\u64CE\uFF1A\u5B9E\u9645\u6A21\u578B\u7531 Claude Code \u539F\u751F\u51B3\u5B9A\uFF0C\u9875\u9762\u4E0A\u7684\u6A21\u578B\u9009\u62E9\u4E0D\u751F\u6548\u3002"
|
|
587
|
+
};
|
|
588
|
+
var en = {
|
|
589
|
+
nav: "Loop engine",
|
|
590
|
+
description: "Choose the agent execution engine that drives sessions; the switch applies to new turns.",
|
|
591
|
+
engineInProcess: "In-process engine (default)",
|
|
592
|
+
engineClaudeCode: "Claude Code CLI",
|
|
593
|
+
engineCodex: "Codex CLI",
|
|
594
|
+
enginePi: "Pi CLI",
|
|
595
|
+
engineKimi: "Kimi Code CLI",
|
|
596
|
+
showInComposerLabel: "Show the engine selector in the chat page",
|
|
597
|
+
unavailable: "Loop engine settings are unavailable",
|
|
598
|
+
switchNotice: "Switching engines interrupts sessions currently running on the previous engine.",
|
|
599
|
+
saving: "Saving\u2026",
|
|
600
|
+
confirmTitle: "Switch loop engine?",
|
|
601
|
+
confirmBody: "Switching interrupts sessions currently running on the previous engine; the page reloads after the switch and new turns use the new engine. Switch now?",
|
|
602
|
+
confirmAction: "Switch",
|
|
603
|
+
cancelAction: "Cancel",
|
|
604
|
+
closeLabel: "Close",
|
|
605
|
+
claudeModelNotice: "Claude Code engine active: the actual model is decided natively by Claude Code; the model selector in this session has no effect."
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
// src/namespace.ts
|
|
609
|
+
var LOOP_ENGINE_SETTINGS_NAMESPACE_LITERAL = "agent-loop-engine";
|
|
610
|
+
|
|
611
|
+
// src/client/index.ts
|
|
612
|
+
var NS = "settings.loop-engine";
|
|
613
|
+
var inject = ["slots", "locale", "settingsScope"];
|
|
614
|
+
function apply(ctx) {
|
|
615
|
+
ctx.effect(() => ctx.locale.register(NS, { zh, en }), "loop-engine: copy dictionaries");
|
|
616
|
+
const scope = ctx.settingsScope.bind({
|
|
617
|
+
namespace: LOOP_ENGINE_SETTINGS_NAMESPACE_LITERAL,
|
|
618
|
+
decode: decodeLoopEngine
|
|
619
|
+
});
|
|
620
|
+
const controller = new LoopEngineStore(scope);
|
|
621
|
+
ctx.effect(() => {
|
|
622
|
+
controller.load();
|
|
623
|
+
return () => {
|
|
624
|
+
controller.dispose();
|
|
625
|
+
};
|
|
626
|
+
}, "loop-engine: store lifecycle");
|
|
627
|
+
const t = ctx.locale.bind(NS);
|
|
628
|
+
const injected = () => ({
|
|
629
|
+
controller,
|
|
630
|
+
hooks: { snapshot: controller.store },
|
|
631
|
+
t
|
|
632
|
+
});
|
|
633
|
+
ctx.slots.inject("settings.section", () => ctx.slots.register({
|
|
634
|
+
name: "settings.section",
|
|
635
|
+
id: "loop-engine",
|
|
636
|
+
order: 30,
|
|
637
|
+
label: () => t("nav"),
|
|
638
|
+
inject: injected
|
|
639
|
+
}, LoopEngineSection));
|
|
640
|
+
ctx.inject(["slots", "conversation"], (scope2) => {
|
|
641
|
+
const badgeInjected = () => ({
|
|
642
|
+
hooks: { snapshot: controller.store },
|
|
643
|
+
t
|
|
644
|
+
});
|
|
645
|
+
scope2.effect(() => {
|
|
646
|
+
return scope2.slots.register({
|
|
647
|
+
name: "conversation.session.header.actions",
|
|
648
|
+
id: "loop-engine",
|
|
649
|
+
// Static session context precedes interactive actions (agent-preset's
|
|
650
|
+
// label sits at -10, so the engine chip leads the header).
|
|
651
|
+
order: -20,
|
|
652
|
+
locale: NS,
|
|
653
|
+
inject: badgeInjected
|
|
654
|
+
}, LoopEngineBadge);
|
|
655
|
+
}, "loop-engine: session header engine badge");
|
|
656
|
+
});
|
|
657
|
+
ctx.inject(["slots", "conversation"], (scope2) => {
|
|
658
|
+
const composerInjected = () => ({
|
|
659
|
+
controller,
|
|
660
|
+
hooks: { snapshot: controller.store },
|
|
661
|
+
t
|
|
662
|
+
});
|
|
663
|
+
scope2.effect(() => {
|
|
664
|
+
return scope2.slots.register({
|
|
665
|
+
name: "conversation.input.right",
|
|
666
|
+
id: "loop-engine",
|
|
667
|
+
order: 0,
|
|
668
|
+
locale: NS,
|
|
669
|
+
inject: composerInjected
|
|
670
|
+
}, LoopEngineComposerSelect);
|
|
671
|
+
}, "loop-engine: composer engine select");
|
|
672
|
+
});
|
|
673
|
+
}
|
|
674
|
+
return module.exports; } });
|
|
675
|
+
//# sourceMappingURL=client.js.map
|