odai-dsh-agent 0.3.6 → 0.3.7
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/client/client.js +16 -3
- package/package.json +1 -1
package/client/client.js
CHANGED
|
@@ -640,7 +640,7 @@ window.__ModuleLoader__.load({
|
|
|
640
640
|
}, [tab, routingAttempted]);
|
|
641
641
|
return ReactDOM.createPortal(h("div", { className: "odaiCC", "data-odai-control-center": PACKAGE_ID }, h("button", { type: "button", className: "odaiCC__backdrop", onClick: onClose, "aria-label": "关闭 Odai 控制中心" }), h("section", { className: "odaiCC__drawer", role: "dialog", "aria-modal": true, "aria-label": "Odai 控制中心" }, h("header", { className: "odaiCC__header" }, h("div", { className: "odaiCC__brand" }, h(GraphIcon), h("div", null, h("h2", null, "Odai 控制中心"), h("span", null, "会话证据 · 路由配置"))), h("nav", { className: "odaiCC__tabs", "aria-label": "控制中心视图" }, h("button", { type: "button", className: tab === "live" ? "is-active" : "", onClick: () => setTab("live") }, "执行"), h("button", { type: "button", className: tab === "routing" ? "is-active" : "", onClick: () => setTab("routing") }, "路由")), h("button", { ref: closeRef, type: "button", className: "odaiCC__close", onClick: onClose, "aria-label": "关闭" }, "×")), h("main", { className: "odaiCC__body" }, tab === "live"
|
|
642
642
|
? h(LiveView, { trace, evidenceError })
|
|
643
|
-
: h(
|
|
643
|
+
: h("div", { className: "odaiCC__routingPage" }, h(RoutingView, { connection, config, setConfig, loading, error, reload }), h(CompactionPressureSettings, { key: sessionId, connection, sessionId }))))), document.body);
|
|
644
644
|
}
|
|
645
645
|
function CompactionPressureSettings({ sessionId, connection }) {
|
|
646
646
|
const [state, setState] = useState(null);
|
|
@@ -689,10 +689,10 @@ window.__ModuleLoader__.load({
|
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
};
|
|
692
|
-
return h("section", { className: "
|
|
692
|
+
return h("section", { className: "odaiCC__pressure", "aria-label": "自动压缩设置" }, h("div", { className: "odaiCC__pressureRow" }, h("div", null, h("h3", null, "自动压缩"), h("p", null, "选择自动压缩的触发方式,设置自动保存。")), h("select", {
|
|
693
693
|
"aria-label": "自动压缩触发方式", disabled: busy || !state, value: state?.configuredMode ?? "host",
|
|
694
694
|
onChange: (event) => void change(event.target.value),
|
|
695
|
-
}, h("option", { value: "host" }, "宿主默认"), h("option", { value: "window-ratio", disabled: !state?.supported }, "按窗口比例"))), h("p",
|
|
695
|
+
}, h("option", { value: "host" }, "宿主默认"), h("option", { value: "window-ratio", disabled: !state?.supported }, "按窗口比例"))), h("p", { className: "odaiCC__pressureHint" }, "按窗口比例:达到模型窗口的 80% 时压缩,不扣除输出预留或额外余量。"), state ? h("p", { role: "status" }, `当前会话实际生效:${state.effectiveMode === "window-ratio" ? "按窗口比例" : "宿主默认"}`) : null, state?.reason ? h("p", { className: "odaiCC__alert", role: "status" }, state.reason) : null, error ? h("p", { className: "odaiCC__alert is-error", role: "alert" }, error) : null);
|
|
696
696
|
}
|
|
697
697
|
function SessionControls({ sessionId, connection }) {
|
|
698
698
|
const [state, setState] = useState(null);
|
|
@@ -811,6 +811,19 @@ window.__ModuleLoader__.load({
|
|
|
811
811
|
@media(max-width:900px){.odaiCC__routeRow{display:block}.odaiCC__dispatch{margin-top:7px}}
|
|
812
812
|
@media(max-width:760px){.odaiCC__launcher span:last-child{display:none}.odaiCC__drawer{inset:6px}.odaiCC__header{grid-template-columns:minmax(0,1fr) auto auto;gap:7px;padding:8px}.odaiCC__brand span{display:none}.odaiCC__tabs button{min-width:56px}.odaiCC__live{padding:8px}.odaiCC__flowGrid{grid-template-columns:1fr;gap:10px;min-height:0}.odaiCC__controllerNode{padding:10px}.odaiCC__flowRole{grid-template-columns:65px minmax(0,1fr)}.odaiCC__evidenceGrid{grid-template-columns:1fr}.odaiCC__inspector{max-height:none}.odaiCC__routing{padding:10px}.odaiCC__controllerLock,.odaiCC__routeSummary{grid-template-columns:92px minmax(0,1fr) auto}.odaiCC__dispatch{grid-template-columns:92px 1fr}.odaiCC__dispatch small{grid-column:2}.odaiCC__routeForm{grid-template-columns:1fr 1fr;margin-left:0}.odaiCC__raw{max-height:240px}}
|
|
813
813
|
@media(max-width:760px){.odaiCC__body{overflow:hidden}.odaiCC__live{gap:8px}.odaiCC__flow{max-height:30vh}.odaiCC__evidenceGrid{grid-template-rows:minmax(180px,1fr) minmax(120px,35vh);overflow:hidden}.odaiCC__timeline,.odaiCC__inspector{min-height:0;max-height:none}}
|
|
814
|
+
|
|
815
|
+
.odaiCC__routingPage{height:100%;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
|
|
816
|
+
.odaiCC__routingPage>.odaiCC__routing{height:auto;overflow:visible}
|
|
817
|
+
.odaiCC__pressure{max-width:964px;margin:0 auto 20px;padding:16px 0;border-top:1px solid var(--odai-cc-border);font-size:12px;line-height:18px;color:var(--odai-cc-text-2)}
|
|
818
|
+
.odaiCC__pressureRow{display:flex;align-items:center;justify-content:space-between;gap:16px}
|
|
819
|
+
.odaiCC__pressure h3{margin:0;font-size:14px;line-height:22px;color:var(--odai-cc-text)}
|
|
820
|
+
.odaiCC__pressure p{margin:6px 0 0;color:var(--odai-cc-text-3)}
|
|
821
|
+
.odaiCC__pressure select{min-width:144px;height:34px;padding:0 10px;border:1px solid var(--odai-cc-border);border-radius:6px;background:var(--odai-cc-panel);color:var(--odai-cc-text);font:inherit;cursor:pointer}
|
|
822
|
+
.odaiCC__pressure select:focus-visible{outline:2px solid var(--odai-cc-accent);outline-offset:2px}
|
|
823
|
+
.odaiCC__pressure select:disabled{opacity:.5;cursor:not-allowed}
|
|
824
|
+
.odaiCC__pressure .odaiCC__alert{margin-top:10px}
|
|
825
|
+
@media(max-width:1000px){.odaiCC__pressure{margin-left:18px;margin-right:18px}}
|
|
826
|
+
@media(max-width:480px){.odaiCC__pressureRow{align-items:flex-start;flex-direction:column}.odaiCC__pressure select{width:100%}}
|
|
814
827
|
@media(min-width:761px){.odaiCC__routing .odaiCC__routeForm{grid-template-columns:repeat(5,minmax(0,1fr))}}
|
|
815
828
|
.odaiCC__routeForm>label{min-width:0}
|
|
816
829
|
.odaiCC__routeChoice{display:flex;flex-direction:column;gap:4px;min-width:0}
|