@dsmm/dsmm 0.1.1 → 0.1.4
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 +24 -13
- package/agent-presets/dsmm-builder/agent.cordis.yml +14 -12
- package/agent-presets/dsmm-builder/preset.yml +1 -1
- package/agent-presets/dsmm-clarifier/agent.cordis.yml +4 -2
- package/agent-presets/dsmm-clarifier/preset.yml +1 -1
- package/agent-presets/dsmm-code-search/agent.cordis.yml +4 -2
- package/agent-presets/dsmm-code-search/preset.yml +1 -1
- package/agent-presets/dsmm-creative/agent.cordis.yml +3 -1
- package/agent-presets/dsmm-creative/preset.yml +1 -1
- package/agent-presets/dsmm-doc-search/agent.cordis.yml +4 -2
- package/agent-presets/dsmm-doc-search/preset.yml +1 -1
- package/agent-presets/dsmm-media-reader/agent.cordis.yml +4 -2
- package/agent-presets/dsmm-media-reader/preset.yml +1 -1
- package/agent-presets/dsmm-oracle/agent.cordis.yml +3 -1
- package/agent-presets/dsmm-oracle/preset.yml +1 -1
- package/agent-presets/dsmm-oracle-2nd/agent.cordis.yml +3 -1
- package/agent-presets/dsmm-oracle-2nd/preset.yml +1 -1
- package/agent-presets/dsmm-orchestrator/agent.cordis.yml +15 -13
- package/agent-presets/dsmm-orchestrator/preset.yml +2 -2
- package/agent-presets/dsmm-plan-critic/agent.cordis.yml +4 -2
- package/agent-presets/dsmm-plan-critic/preset.yml +1 -1
- package/agent-presets/dsmm-planner/agent.cordis.yml +4 -2
- package/agent-presets/dsmm-planner/preset.yml +1 -1
- package/agent-presets/dsmm-reviewer/agent.cordis.yml +4 -2
- package/agent-presets/dsmm-reviewer/preset.yml +1 -1
- package/docs/agent-presets.md +15 -5
- package/docs/compatibility.md +64 -11
- package/docs/model-routing.md +10 -6
- package/docs/profiles.md +83 -0
- package/docs/releasing.md +58 -19
- package/docs/settings-status.md +13 -5
- package/lib/client/ProfilesSection.d.ts +11 -0
- package/lib/client/ProfilesSection.js +62 -0
- package/lib/client/controller.d.ts +77 -0
- package/lib/client/controller.js +198 -0
- package/lib/client/index.d.ts +11 -0
- package/lib/client/index.js +34 -0
- package/lib/client/locales.d.ts +56 -0
- package/lib/client/locales.js +48 -0
- package/lib/client/styles.d.ts +3 -0
- package/lib/client/styles.js +25 -0
- package/lib/client.js +1930 -0
- package/lib/commands.d.ts +3 -3
- package/lib/commands.js +4 -4
- package/lib/dsh-types.d.ts +4 -0
- package/lib/guards.d.ts +2 -2
- package/lib/guards.js +3 -2
- package/lib/index.d.ts +12 -4
- package/lib/index.js +72 -20
- package/lib/mode.d.ts +2 -2
- package/lib/mode.js +1 -1
- package/lib/model-routing.d.ts +2 -2
- package/lib/model-routing.js +17 -2
- package/lib/preset-registry.js +5 -3
- package/lib/profile-remote.d.ts +31 -0
- package/lib/profile-remote.js +106 -0
- package/lib/profile-rpc.d.ts +27 -0
- package/lib/profile-rpc.js +90 -0
- package/lib/profile-runtime.d.ts +44 -0
- package/lib/profile-runtime.js +159 -0
- package/lib/profile-store.d.ts +42 -0
- package/lib/profile-store.js +478 -0
- package/lib/profile-types.d.ts +40 -0
- package/lib/profile-types.js +2 -0
- package/lib/profiles.d.ts +26 -0
- package/lib/profiles.js +237 -0
- package/lib/prompts.d.ts +2 -2
- package/lib/prompts.js +4 -4
- package/lib/role-providers.d.ts +2 -2
- package/lib/role-providers.js +39 -6
- package/lib/role-routing.d.ts +2 -2
- package/lib/role-routing.js +4 -1
- package/lib/role-subagents.d.ts +2 -2
- package/lib/role-subagents.js +6 -4
- package/lib/roles.d.ts +4 -0
- package/lib/roles.js +43 -27
- package/lib/runtime-recovery.d.ts +2 -2
- package/lib/runtime-recovery.js +3 -3
- package/lib/session-metadata.d.ts +13 -0
- package/lib/session-metadata.js +34 -0
- package/lib/session-persistence.d.ts +35 -0
- package/lib/session-persistence.js +304 -0
- package/lib/settings.d.ts +8 -1
- package/lib/settings.js +4 -0
- package/lib/state.d.ts +1 -0
- package/lib/state.js +4 -0
- package/lib/status.js +6 -5
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +62 -15
- package/patches/agent-presets-root.example.cordis.patch.yml +6 -10
- package/prompts/deepseek-v4-pro.md +1 -1
- package/prompts/deepwork.md +3 -3
- package/scripts/repair-session-log.mjs +476 -0
- package/scripts/session-repair-native-verifier.mjs +367 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useId, useRef } from "react";
|
|
3
|
+
import { Button, Input } from "@deepseek-ai/dsh-client-ui-primitives";
|
|
4
|
+
import { canReconcileSelection } from "./controller.js";
|
|
5
|
+
function issueKey(issue) {
|
|
6
|
+
if (issue.source === "selection")
|
|
7
|
+
return issue.code === "conflict" ? "selectionConflict" : "appliedInvalid";
|
|
8
|
+
if (issue.kind === "assembly")
|
|
9
|
+
return "unavailable";
|
|
10
|
+
if (issue.kind === "transport")
|
|
11
|
+
return "transport";
|
|
12
|
+
return issue.code === "conflict" || issue.code === "validation" ? issue.code : "io";
|
|
13
|
+
}
|
|
14
|
+
/** One native settings.section; policy selection is never coupled to browsing. */
|
|
15
|
+
export function ProfilesSection(props) {
|
|
16
|
+
const { t } = props;
|
|
17
|
+
const state = props.useProfiles((snapshot) => snapshot);
|
|
18
|
+
const prefix = useId();
|
|
19
|
+
const selectRef = useRef(null);
|
|
20
|
+
const inputRef = useRef(null);
|
|
21
|
+
const editorRef = useRef(null);
|
|
22
|
+
const cancelRef = useRef(null);
|
|
23
|
+
const hadConfirmation = useRef(false);
|
|
24
|
+
const disabled = state.busy !== null || state.pendingEditor !== null;
|
|
25
|
+
const snapshot = state.snapshot;
|
|
26
|
+
const editor = state.editor;
|
|
27
|
+
const reconcilable = canReconcileSelection(snapshot);
|
|
28
|
+
const selectionConflict = reconcilable && snapshot?.selectionError?.code === "conflict";
|
|
29
|
+
const invalid = state.issue?.kind === "domain" && state.issue.code === "validation";
|
|
30
|
+
const idInvalid = invalid && state.issue?.field === "id";
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
if (state.pendingEditor !== null) {
|
|
33
|
+
cancelRef.current?.focus();
|
|
34
|
+
hadConfirmation.current = true;
|
|
35
|
+
}
|
|
36
|
+
else if (hadConfirmation.current) {
|
|
37
|
+
selectRef.current?.focus();
|
|
38
|
+
hadConfirmation.current = false;
|
|
39
|
+
}
|
|
40
|
+
}, [state.pendingEditor]);
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
if (state.issue?.kind === "domain" && state.issue.code === "validation") {
|
|
43
|
+
if (state.issue.field === "id")
|
|
44
|
+
inputRef.current?.focus();
|
|
45
|
+
else
|
|
46
|
+
editorRef.current?.focus();
|
|
47
|
+
}
|
|
48
|
+
}, [state.issue]);
|
|
49
|
+
const applied = editor?.revision !== null && editor?.id === snapshot?.selectedId && editor?.revision === snapshot?.appliedRevision;
|
|
50
|
+
let selection = t("baseline");
|
|
51
|
+
if (snapshot?.selectionError !== undefined && !selectionConflict)
|
|
52
|
+
selection = t("appliedInvalid");
|
|
53
|
+
else if (snapshot?.selectedId !== null && snapshot?.selectedId !== undefined)
|
|
54
|
+
selection = t("appliedProfile", { id: snapshot.selectedId, revision: snapshot.appliedRevision?.slice(0, 12) ?? "—" });
|
|
55
|
+
const notice = state.notice === null ? "" : t(state.notice.key === "reset" ? "resetDone" : state.notice.key, { id: state.notice.id });
|
|
56
|
+
return _jsxs("section", { className: "dsmm-profiles", "aria-labelledby": `${prefix}-title`, "aria-busy": state.busy !== null, children: [_jsx("h2", { id: `${prefix}-title`, children: t("title") }), _jsx("p", { children: t("description") }), _jsx("p", { className: "dsmm-hint", children: t("newSessions") }), _jsx("p", { "data-dsmm-selection": true, children: selection }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "outline", disabled: disabled || snapshot === null, onClick: () => { void props.create(); }, children: t("new") }), _jsx(Button, { type: "button", variant: "outline", disabled: disabled, onClick: () => { void props.refresh(); }, children: t(state.busy === "refresh" ? "refreshing" : "refresh") }), _jsx(Button, { type: "button", variant: "outline", disabled: disabled || !reconcilable || (snapshot?.selectedId === null && !selectionConflict), onClick: () => { void props.reset(); }, children: t(state.busy === "reset" ? "resetting" : "reset") })] }), snapshot !== null && _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${prefix}-select`, children: t("editorSelect") }), _jsxs("select", { ref: selectRef, id: `${prefix}-select`, disabled: disabled, value: editor?.revision == null ? "" : editor.id, onChange: (event) => { if (event.currentTarget.value)
|
|
57
|
+
void props.open(event.currentTarget.value); }, children: [_jsx("option", { value: "", children: t(editor?.revision === null ? "newDraft" : "choose") }), snapshot.profiles.map((profile, index) => _jsxs("option", { value: profile.id, children: [profile.label === undefined ? profile.id : `${profile.label} (${profile.id})`, profile.error === undefined ? "" : ` — ${t("invalidProfile", { id: profile.id })}`] }, `${index}:${profile.id}`))] }), snapshot.profiles.length === 0 && _jsx("p", { className: "dsmm-hint", children: t("empty") })] }), state.pendingEditor !== null && _jsxs("div", { className: "dsmm-confirm", role: "group", "aria-labelledby": `${prefix}-confirm`, onKeyDown: (event) => { if (event.key === "Escape") {
|
|
58
|
+
event.preventDefault();
|
|
59
|
+
props.cancelDiscard();
|
|
60
|
+
} }, children: [_jsx("p", { id: `${prefix}-confirm`, children: t("discardPrompt") }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "outline", onClick: () => { void props.discardAndOpen(); }, children: t("discard") }), _jsx(Button, { ref: cancelRef, type: "button", variant: "primary", onClick: props.cancelDiscard, children: t("cancel") })] })] }), editor !== null && _jsxs("div", { className: "dsmm-editor", children: [_jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${prefix}-id`, children: t("profileId") }), _jsx(Input, { ref: inputRef, id: `${prefix}-id`, className: "dsmm-input", value: editor.id, disabled: disabled || editor.revision !== null, "aria-invalid": idInvalid || undefined, "aria-describedby": `${prefix}-id-hint${idInvalid ? ` ${prefix}-issue` : ""}`, onChange: (event) => props.editId(event.currentTarget.value) }), _jsx("p", { id: `${prefix}-id-hint`, className: "dsmm-hint", children: t("idHint") })] }), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${prefix}-content`, children: t("configuration") }), _jsx("textarea", { ref: editorRef, id: `${prefix}-content`, rows: 12, spellCheck: false, value: editor.content, disabled: disabled, "aria-invalid": (invalid && !idInvalid) || undefined, "aria-describedby": `${prefix}-content-hint ${prefix}-structural-hint${invalid && !idInvalid ? ` ${prefix}-issue` : ""}`, onChange: (event) => props.editContent(event.currentTarget.value) }), _jsx("p", { id: `${prefix}-content-hint`, className: "dsmm-hint", children: t("configurationHint") }), _jsx("p", { id: `${prefix}-structural-hint`, className: "dsmm-hint", children: t("structuralHint") })] }), _jsx("p", { "data-dsmm-editor-state": true, children: t(state.dirty ? "dirty" : applied ? "savedApplied" : "savedNotApplied") }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "primary", disabled: disabled || !state.dirty || snapshot === null, onClick: () => { void props.save(); }, children: t(state.busy === "save" ? "saving" : "save") }), _jsx(Button, { type: "button", variant: "outline", disabled: disabled || state.dirty || editor.revision === null || !reconcilable || (applied && !selectionConflict), onClick: () => { void props.apply(); }, children: t(state.busy === "apply" ? "applying" : "apply") }), editor.revision !== null && _jsx(Button, { type: "button", variant: "outline", disabled: disabled, onClick: () => { void props.reload(); }, children: t("reload") })] })] }), state.issue !== null && _jsxs("div", { className: "dsmm-issue", id: `${prefix}-issue`, role: "alert", children: [_jsx("p", { children: t(issueKey(state.issue)) }), state.issue.kind === "domain" && state.issue.message !== undefined && _jsxs("p", { children: [t("details"), ": ", state.issue.message] })] }), snapshot?.selectionError !== undefined && _jsxs("div", { className: "dsmm-issue", children: [_jsxs("p", { children: [t("details"), ": ", snapshot.selectionError.message] }), _jsx("p", { children: t(selectionConflict ? "selectionConflict" : "retry") })] }), _jsx("p", { className: "dsmm-status", role: "status", "aria-live": "polite", "aria-atomic": "true", children: state.busy === "refresh" && snapshot === null ? t("loading") : state.busy === "read" ? t("reading") : notice })] });
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=ProfilesSection.js.map
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { DsmmProfilesRemote } from "../profile-remote.js";
|
|
2
|
+
import type { ProfileErrorInfo, ProfileReadResult, ProfileSnapshot } from "../profile-types.js";
|
|
3
|
+
export interface ProfileEditor {
|
|
4
|
+
id: string;
|
|
5
|
+
content: string;
|
|
6
|
+
revision: string | null;
|
|
7
|
+
}
|
|
8
|
+
export interface ProfilesNotice {
|
|
9
|
+
key: "saved" | "applied" | "reset";
|
|
10
|
+
id?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ProfilesIssue {
|
|
13
|
+
kind: "domain" | "transport" | "assembly";
|
|
14
|
+
code: string;
|
|
15
|
+
message?: string;
|
|
16
|
+
field?: string;
|
|
17
|
+
source?: "selection";
|
|
18
|
+
}
|
|
19
|
+
export interface ProfilesViewSnapshot {
|
|
20
|
+
snapshot: ProfileSnapshot | null;
|
|
21
|
+
editor: ProfileEditor | null;
|
|
22
|
+
dirty: boolean;
|
|
23
|
+
busy: "refresh" | "read" | "save" | "apply" | "reset" | null;
|
|
24
|
+
issue: ProfilesIssue | null;
|
|
25
|
+
notice: ProfilesNotice | null;
|
|
26
|
+
pendingEditor: string | null;
|
|
27
|
+
}
|
|
28
|
+
export interface ProfilesActions {
|
|
29
|
+
refresh(): Promise<void>;
|
|
30
|
+
open(id: string): Promise<void>;
|
|
31
|
+
create(): Promise<void>;
|
|
32
|
+
reload(): Promise<void>;
|
|
33
|
+
editId(id: string): void;
|
|
34
|
+
editContent(content: string): void;
|
|
35
|
+
save(): Promise<void>;
|
|
36
|
+
apply(): Promise<void>;
|
|
37
|
+
reset(): Promise<void>;
|
|
38
|
+
discardAndOpen(): Promise<void>;
|
|
39
|
+
cancelDiscard(): void;
|
|
40
|
+
}
|
|
41
|
+
export declare const NEW_PROFILE_CONTENT = "{\n \"version\": 1,\n \"id\": \"new-profile\",\n \"label\": \"New profile\",\n \"settings\": {\n // Runtime overlay only. Omitted fields inherit the deployment baseline.\n \"defaultActive\": true\n }\n}\n";
|
|
42
|
+
/** A valid external CAS conflict is reconcilable; corruption is never reset implicitly. */
|
|
43
|
+
export declare function canReconcileSelection(snapshot: ProfileSnapshot | null): boolean;
|
|
44
|
+
/** Stable native Store seat, with no filesystem or transport authority. */
|
|
45
|
+
export declare class ProfilesController {
|
|
46
|
+
private readonly remote;
|
|
47
|
+
private current;
|
|
48
|
+
private accepted;
|
|
49
|
+
private listeners;
|
|
50
|
+
private generation;
|
|
51
|
+
private disposed;
|
|
52
|
+
readonly store: {
|
|
53
|
+
getSnapshot: () => ProfilesViewSnapshot;
|
|
54
|
+
subscribe: (listener: () => void) => (() => void);
|
|
55
|
+
};
|
|
56
|
+
readonly actions: ProfilesActions;
|
|
57
|
+
constructor(remote: DsmmProfilesRemote);
|
|
58
|
+
dispose(): void;
|
|
59
|
+
private publish;
|
|
60
|
+
private accept;
|
|
61
|
+
private unwrap;
|
|
62
|
+
private issue;
|
|
63
|
+
private perform;
|
|
64
|
+
refresh(): Promise<void>;
|
|
65
|
+
open(id: string): Promise<void>;
|
|
66
|
+
reload(): Promise<void>;
|
|
67
|
+
private loadEditor;
|
|
68
|
+
discardAndOpen(): Promise<void>;
|
|
69
|
+
private editId;
|
|
70
|
+
private editContent;
|
|
71
|
+
save(): Promise<void>;
|
|
72
|
+
apply(): Promise<void>;
|
|
73
|
+
reset(): Promise<void>;
|
|
74
|
+
private acceptSelection;
|
|
75
|
+
}
|
|
76
|
+
export type { ProfileErrorInfo, ProfileReadResult };
|
|
77
|
+
//# sourceMappingURL=controller.d.ts.map
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { applyEdits, modify } from "jsonc-parser";
|
|
2
|
+
import { isProfileId } from "../profile-remote.js";
|
|
3
|
+
const NEW_EDITOR = "";
|
|
4
|
+
export const NEW_PROFILE_CONTENT = '{\n "version": 1,\n "id": "new-profile",\n "label": "New profile",\n "settings": {\n // Runtime overlay only. Omitted fields inherit the deployment baseline.\n "defaultActive": true\n }\n}\n';
|
|
5
|
+
/** A valid external CAS conflict is reconcilable; corruption is never reset implicitly. */
|
|
6
|
+
export function canReconcileSelection(snapshot) {
|
|
7
|
+
return snapshot !== null && (snapshot.selectionRevision === "absent" || /^[a-f0-9]{64}$/u.test(snapshot.selectionRevision))
|
|
8
|
+
&& (snapshot.selectionError === undefined || snapshot.selectionError.code === "conflict");
|
|
9
|
+
}
|
|
10
|
+
/** Stable native Store seat, with no filesystem or transport authority. */
|
|
11
|
+
export class ProfilesController {
|
|
12
|
+
remote;
|
|
13
|
+
current = { snapshot: null, editor: null, dirty: false, busy: null, issue: null, notice: null, pendingEditor: null };
|
|
14
|
+
accepted = null;
|
|
15
|
+
listeners = new Set();
|
|
16
|
+
generation = 0;
|
|
17
|
+
disposed = false;
|
|
18
|
+
store = {
|
|
19
|
+
getSnapshot: () => this.current,
|
|
20
|
+
subscribe: (listener) => {
|
|
21
|
+
this.listeners.add(listener);
|
|
22
|
+
return () => { this.listeners.delete(listener); };
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
actions = {
|
|
26
|
+
refresh: () => this.refresh(), open: (id) => this.open(id), create: () => this.open(NEW_EDITOR), reload: () => this.reload(),
|
|
27
|
+
editId: (id) => this.editId(id), editContent: (content) => this.editContent(content),
|
|
28
|
+
save: () => this.save(), apply: () => this.apply(), reset: () => this.reset(),
|
|
29
|
+
discardAndOpen: () => this.discardAndOpen(), cancelDiscard: () => this.publish({ pendingEditor: null }),
|
|
30
|
+
};
|
|
31
|
+
constructor(remote) {
|
|
32
|
+
this.remote = remote;
|
|
33
|
+
}
|
|
34
|
+
dispose() { this.disposed = true; this.generation += 1; this.listeners.clear(); }
|
|
35
|
+
publish(patch) {
|
|
36
|
+
if (this.disposed)
|
|
37
|
+
return;
|
|
38
|
+
this.current = { ...this.current, ...patch };
|
|
39
|
+
for (const listener of this.listeners)
|
|
40
|
+
listener();
|
|
41
|
+
}
|
|
42
|
+
accept(document) {
|
|
43
|
+
this.accepted = { ...document };
|
|
44
|
+
this.publish({ editor: { ...document }, dirty: false, pendingEditor: null });
|
|
45
|
+
}
|
|
46
|
+
async unwrap(request, field) {
|
|
47
|
+
const result = await request;
|
|
48
|
+
if (result.ok)
|
|
49
|
+
return result.value;
|
|
50
|
+
if (result.error.code === "dsmm-profiles/refused") {
|
|
51
|
+
throw { kind: "domain", ...result.error.details };
|
|
52
|
+
}
|
|
53
|
+
if (["gateway/input-invalid", "gateway/arguments-invalid"].includes(String(result.error.code))) {
|
|
54
|
+
throw { kind: "domain", code: "validation", field, message: "The native Host rejected a request field. Check the profile ID and document size before retrying." };
|
|
55
|
+
}
|
|
56
|
+
throw { kind: "transport", code: result.error.code };
|
|
57
|
+
}
|
|
58
|
+
issue(error) {
|
|
59
|
+
if (typeof error === "object" && error !== null && "kind" in error && (error.kind === "domain" || error.kind === "transport"))
|
|
60
|
+
return error;
|
|
61
|
+
return { kind: "assembly", code: "unavailable" };
|
|
62
|
+
}
|
|
63
|
+
async perform(busy, operation) {
|
|
64
|
+
if (this.disposed || this.current.busy !== null || this.current.pendingEditor !== null)
|
|
65
|
+
return;
|
|
66
|
+
const generation = ++this.generation;
|
|
67
|
+
const live = () => !this.disposed && generation === this.generation;
|
|
68
|
+
this.publish({ busy, issue: null, notice: null });
|
|
69
|
+
try {
|
|
70
|
+
await operation(live);
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
if (live())
|
|
74
|
+
this.publish({ issue: this.issue(error) });
|
|
75
|
+
}
|
|
76
|
+
finally {
|
|
77
|
+
if (live())
|
|
78
|
+
this.publish({ busy: null });
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
async refresh() {
|
|
82
|
+
await this.perform("refresh", async (live) => {
|
|
83
|
+
const snapshot = await this.unwrap(this.remote.describe());
|
|
84
|
+
if (live())
|
|
85
|
+
this.publish({ snapshot });
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
async open(id) {
|
|
89
|
+
if (this.disposed || this.current.busy !== null || this.current.pendingEditor !== null)
|
|
90
|
+
return;
|
|
91
|
+
if (id !== NEW_EDITOR && this.current.editor?.id === id)
|
|
92
|
+
return;
|
|
93
|
+
if (this.current.dirty) {
|
|
94
|
+
this.publish({ pendingEditor: id });
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
await this.loadEditor(id);
|
|
98
|
+
}
|
|
99
|
+
async reload() {
|
|
100
|
+
const editor = this.current.editor;
|
|
101
|
+
if (editor === null || editor.revision === null || this.current.busy !== null || this.current.pendingEditor !== null)
|
|
102
|
+
return;
|
|
103
|
+
if (this.current.dirty) {
|
|
104
|
+
this.publish({ pendingEditor: editor.id });
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
await this.loadEditor(editor.id);
|
|
108
|
+
}
|
|
109
|
+
async loadEditor(id) {
|
|
110
|
+
if (id === NEW_EDITOR) {
|
|
111
|
+
this.accepted = null;
|
|
112
|
+
this.publish({ editor: { id: "new-profile", content: NEW_PROFILE_CONTENT, revision: null }, dirty: true, issue: null, notice: null, pendingEditor: null });
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
await this.perform("read", async (live) => {
|
|
116
|
+
const document = await this.unwrap(this.remote.read(id), "id");
|
|
117
|
+
if (live())
|
|
118
|
+
this.accept(document);
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
async discardAndOpen() {
|
|
122
|
+
const wanted = this.current.pendingEditor;
|
|
123
|
+
if (wanted === null || this.current.busy !== null)
|
|
124
|
+
return;
|
|
125
|
+
this.publish({ pendingEditor: null });
|
|
126
|
+
// Only explicit confirmation clears a draft; a failed read restores it.
|
|
127
|
+
const previous = this.current.editor;
|
|
128
|
+
const accepted = this.accepted;
|
|
129
|
+
await this.loadEditor(wanted);
|
|
130
|
+
if (this.current.issue !== null && previous !== null) {
|
|
131
|
+
this.accepted = accepted;
|
|
132
|
+
this.publish({ editor: previous, dirty: true });
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
editId(id) {
|
|
136
|
+
const editor = this.current.editor;
|
|
137
|
+
if (editor === null || editor.revision !== null || this.current.busy !== null || this.current.pendingEditor !== null)
|
|
138
|
+
return;
|
|
139
|
+
let content = editor.content;
|
|
140
|
+
try {
|
|
141
|
+
content = applyEdits(content, modify(content, ["id"], id, { formattingOptions: { insertSpaces: true, tabSize: 2 } }));
|
|
142
|
+
}
|
|
143
|
+
catch { /* Keep invalid JSONC intact; the Host explains validation on save. */ }
|
|
144
|
+
this.publish({ editor: { ...editor, id, content }, dirty: true, issue: null, notice: null });
|
|
145
|
+
}
|
|
146
|
+
editContent(content) {
|
|
147
|
+
const editor = this.current.editor;
|
|
148
|
+
if (editor === null || this.current.busy !== null || this.current.pendingEditor !== null)
|
|
149
|
+
return;
|
|
150
|
+
this.publish({ editor: { ...editor, content }, dirty: this.accepted === null || this.accepted.content !== content || this.accepted.id !== editor.id, issue: null, notice: null });
|
|
151
|
+
}
|
|
152
|
+
async save() {
|
|
153
|
+
const editor = this.current.editor;
|
|
154
|
+
if (editor === null || !this.current.dirty || this.current.snapshot === null || this.current.busy !== null || this.current.pendingEditor !== null)
|
|
155
|
+
return;
|
|
156
|
+
if (!isProfileId(editor.id)) {
|
|
157
|
+
this.publish({ issue: { kind: "domain", code: "validation", field: "id" }, notice: null });
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
await this.perform("save", async (live) => {
|
|
161
|
+
const document = await this.unwrap(this.remote.save({ id: editor.id, content: editor.content, expectedRevision: editor.revision }), "content");
|
|
162
|
+
if (!live())
|
|
163
|
+
return;
|
|
164
|
+
this.accept(document);
|
|
165
|
+
// The accepted response proves save; applying remains a separate commit.
|
|
166
|
+
const old = this.current.snapshot;
|
|
167
|
+
const profiles = old.profiles.filter((item) => item.id !== document.id);
|
|
168
|
+
profiles.push({ id: document.id, revision: document.revision, ...(document.label === undefined ? {} : { label: document.label }) });
|
|
169
|
+
profiles.sort((a, b) => a.id.localeCompare(b.id));
|
|
170
|
+
this.publish({ snapshot: { ...old, profiles }, notice: { key: "saved", id: document.id } });
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
async apply() {
|
|
174
|
+
const { editor, snapshot, dirty } = this.current;
|
|
175
|
+
if (editor?.revision == null || !canReconcileSelection(snapshot) || dirty)
|
|
176
|
+
return;
|
|
177
|
+
await this.perform("apply", async (live) => {
|
|
178
|
+
const accepted = await this.unwrap(this.remote.select({ id: editor.id, expectedRevision: editor.revision, expectedSelectionRevision: snapshot.selectionRevision }));
|
|
179
|
+
if (live())
|
|
180
|
+
this.acceptSelection(accepted, { key: "applied", id: accepted.selectedId ?? undefined });
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
async reset() {
|
|
184
|
+
const snapshot = this.current.snapshot;
|
|
185
|
+
if (!canReconcileSelection(snapshot))
|
|
186
|
+
return;
|
|
187
|
+
await this.perform("reset", async (live) => {
|
|
188
|
+
const accepted = await this.unwrap(this.remote.select({ id: null, expectedSelectionRevision: snapshot.selectionRevision }));
|
|
189
|
+
if (live())
|
|
190
|
+
this.acceptSelection(accepted, { key: "reset" });
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
acceptSelection(snapshot, notice) {
|
|
194
|
+
this.publish({ snapshot, notice: snapshot.selectionError === undefined ? notice : null,
|
|
195
|
+
issue: snapshot.selectionError === undefined ? null : { kind: "domain", ...snapshot.selectionError, source: "selection" } });
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
//# sourceMappingURL=controller.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Context } from "@deepseek-ai/cordis";
|
|
2
|
+
export { ProfilesController, NEW_PROFILE_CONTENT } from "./controller.js";
|
|
3
|
+
export type { ProfilesActions, ProfilesViewSnapshot, ProfilesIssue } from "./controller.js";
|
|
4
|
+
export { ProfilesSection } from "./ProfilesSection.js";
|
|
5
|
+
export type { ProfilesSectionProps, ProfilesInjected } from "./ProfilesSection.js";
|
|
6
|
+
export { NS, en, zh } from "./locales.js";
|
|
7
|
+
export { TYPERT_REMOTE } from "../profile-remote.js";
|
|
8
|
+
/** No self-dependency on a namespace that this contribution has not mounted. */
|
|
9
|
+
export declare const inject: readonly ["slots", "locale", "remote"];
|
|
10
|
+
export declare function apply(ctx: Context): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { TYPERT_REMOTE } from "../profile-remote.js";
|
|
2
|
+
import { ProfilesController } from "./controller.js";
|
|
3
|
+
import { NS, en, zh } from "./locales.js";
|
|
4
|
+
import { ProfilesSection } from "./ProfilesSection.js";
|
|
5
|
+
import { PROFILE_STYLES } from "./styles.js";
|
|
6
|
+
export { ProfilesController, NEW_PROFILE_CONTENT } from "./controller.js";
|
|
7
|
+
export { ProfilesSection } from "./ProfilesSection.js";
|
|
8
|
+
export { NS, en, zh } from "./locales.js";
|
|
9
|
+
export { TYPERT_REMOTE } from "../profile-remote.js";
|
|
10
|
+
/** No self-dependency on a namespace that this contribution has not mounted. */
|
|
11
|
+
export const inject = ["slots", "locale", "remote"];
|
|
12
|
+
export async function apply(ctx) {
|
|
13
|
+
await ctx.remote.$mount(TYPERT_REMOTE);
|
|
14
|
+
await ctx.inject(["remote.dsmmProfiles"], (profileCtx) => {
|
|
15
|
+
const controller = new ProfilesController(profileCtx.remote.dsmmProfiles);
|
|
16
|
+
profileCtx.effect(() => () => controller.dispose(), "dsmm: profile editor");
|
|
17
|
+
profileCtx.effect(() => profileCtx.locale.register(NS, { en, zh }), "dsmm: profile locale");
|
|
18
|
+
profileCtx.effect(() => {
|
|
19
|
+
const style = document.createElement("style");
|
|
20
|
+
style.dataset.dsmmProfiles = "";
|
|
21
|
+
style.textContent = PROFILE_STYLES;
|
|
22
|
+
document.head.append(style);
|
|
23
|
+
return () => style.remove();
|
|
24
|
+
}, "dsmm: profile styles");
|
|
25
|
+
const t = profileCtx.locale.bind(NS);
|
|
26
|
+
profileCtx.slots.inject("settings.section", () => profileCtx.slots.register({
|
|
27
|
+
name: "settings.section", id: "dsmm-profiles", order: 30,
|
|
28
|
+
label: () => t("title"), locale: NS,
|
|
29
|
+
inject: () => ({ hooks: { profiles: controller.store }, ...controller.actions }),
|
|
30
|
+
}, ProfilesSection));
|
|
31
|
+
void controller.refresh();
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export declare const NS = "settings.dsmm-profiles";
|
|
2
|
+
export declare const en: {
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
newSessions: string;
|
|
6
|
+
editorSelect: string;
|
|
7
|
+
choose: string;
|
|
8
|
+
newDraft: string;
|
|
9
|
+
new: string;
|
|
10
|
+
profileId: string;
|
|
11
|
+
idHint: string;
|
|
12
|
+
configuration: string;
|
|
13
|
+
configurationHint: string;
|
|
14
|
+
structuralHint: string;
|
|
15
|
+
save: string;
|
|
16
|
+
saving: string;
|
|
17
|
+
apply: string;
|
|
18
|
+
applying: string;
|
|
19
|
+
reset: string;
|
|
20
|
+
resetting: string;
|
|
21
|
+
refresh: string;
|
|
22
|
+
refreshing: string;
|
|
23
|
+
reload: string;
|
|
24
|
+
loading: string;
|
|
25
|
+
reading: string;
|
|
26
|
+
empty: string;
|
|
27
|
+
baseline: string;
|
|
28
|
+
appliedProfile: string;
|
|
29
|
+
appliedInvalid: string;
|
|
30
|
+
selectionConflict: string;
|
|
31
|
+
dirty: string;
|
|
32
|
+
savedNotApplied: string;
|
|
33
|
+
savedApplied: string;
|
|
34
|
+
saved: string;
|
|
35
|
+
applied: string;
|
|
36
|
+
resetDone: string;
|
|
37
|
+
discardPrompt: string;
|
|
38
|
+
discard: string;
|
|
39
|
+
cancel: string;
|
|
40
|
+
conflict: string;
|
|
41
|
+
validation: string;
|
|
42
|
+
io: string;
|
|
43
|
+
unavailable: string;
|
|
44
|
+
transport: string;
|
|
45
|
+
invalidProfile: string;
|
|
46
|
+
details: string;
|
|
47
|
+
retry: string;
|
|
48
|
+
};
|
|
49
|
+
export type ProfilesLocaleKey = keyof typeof en;
|
|
50
|
+
export declare const zh: Record<ProfilesLocaleKey, string>;
|
|
51
|
+
declare module "@deepseek-ai/dsh-client-ui-slots" {
|
|
52
|
+
interface LocaleNamespaceMap {
|
|
53
|
+
"settings.dsmm-profiles": ProfilesLocaleKey;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export const NS = "settings.dsmm-profiles";
|
|
2
|
+
export const en = {
|
|
3
|
+
title: "Deepwork Profiles", description: "Save independent runtime configurations and choose which one new sessions use.",
|
|
4
|
+
newSessions: "Apply and reset affect new sessions only. Existing sessions, including blank sessions, keep their current policy. A cold resume uses the currently applied policy.",
|
|
5
|
+
editorSelect: "Profile to edit", choose: "Choose a profile", newDraft: "New unsaved profile", new: "New profile",
|
|
6
|
+
profileId: "Profile ID (name)", idHint: "Use 1–64 lowercase letters, digits, hyphens or underscores. The ID cannot be changed after saving. Add an optional display label in the JSONC document.",
|
|
7
|
+
configuration: "Runtime configuration (JSONC)", configurationHint: "Document: version 1, matching id, optional label, and settings. Supported runtime settings: defaultActive, roleRouting, workflow, guards, runtimeRecovery, and both DeepSeek families’ calibration, default-effort and max-preset policies.",
|
|
8
|
+
structuralHint: "Roles, skills, mode names, prompt order/content, preset installation, LSP, providers and accounts belong in native deployment configuration, not profiles. Routing may reference an existing provider; never paste credentials.",
|
|
9
|
+
save: "Save profile", saving: "Saving profile…", apply: "Apply saved profile", applying: "Applying profile…", reset: "Reset to baseline", resetting: "Resetting to baseline…",
|
|
10
|
+
refresh: "Refresh profiles", refreshing: "Refreshing profiles…", reload: "Reload saved profile", loading: "Loading profiles…", reading: "Reading profile…",
|
|
11
|
+
empty: "No saved profiles yet. Create a profile to start; the deployment baseline remains applied.",
|
|
12
|
+
baseline: "Applied to new sessions: deployment baseline.", appliedProfile: "Applied to new sessions: {id} (revision {revision}).",
|
|
13
|
+
appliedInvalid: "The stored selection cannot be confirmed. Existing sessions remain unchanged. Resolve the Host diagnostic before applying or resetting a profile.",
|
|
14
|
+
selectionConflict: "The stored selection changed outside this Host. This Host still uses the policy shown above for new sessions. Apply a saved profile or reset to baseline to reconcile it; restarting adopts the stored selection. Existing sessions stay unchanged.",
|
|
15
|
+
dirty: "Unsaved changes. Save before applying; saving alone does not apply this profile.", savedNotApplied: "Saved profile; this revision is not applied to new sessions.", savedApplied: "This saved revision is applied to new sessions.",
|
|
16
|
+
saved: "Saved {id}. The applied policy was not changed.", applied: "Applied {id} for new sessions. Existing sessions were not changed.", resetDone: "Reset to the deployment baseline for new sessions. Existing sessions were not changed.",
|
|
17
|
+
discardPrompt: "Discard the unsaved draft before changing the editor?", discard: "Discard changes", cancel: "Cancel",
|
|
18
|
+
conflict: "The saved file or selection changed elsewhere. Your draft and the prior selection were kept. Refresh profiles, then reload the saved profile or review your draft before retrying.",
|
|
19
|
+
validation: "This profile is not valid. Correct the field below; your draft is unchanged.",
|
|
20
|
+
io: "The Host could not commit this operation. Your draft and the prior selection were kept. Check profile storage access, refresh, then retry.",
|
|
21
|
+
unavailable: "The native profile service is unavailable. Your draft is kept. Refresh after the Host reconnects or Deepwork is enabled.",
|
|
22
|
+
transport: "The native connection could not confirm this operation. Your draft is kept. Refresh the Host state before retrying; do not assume a save or apply completed.",
|
|
23
|
+
invalidProfile: "Unavailable profile: {id}", details: "Host diagnostic", retry: "Resolve the diagnostic, refresh profiles, then retry.",
|
|
24
|
+
};
|
|
25
|
+
export const zh = {
|
|
26
|
+
title: "Deepwork 配置档", description: "保存独立的运行时配置,并选择新会话使用的配置档。",
|
|
27
|
+
newSessions: "应用和重置仅影响新会话。已有会话(包括空白会话)保留原策略。冷恢复使用当前已应用的策略。",
|
|
28
|
+
editorSelect: "要编辑的配置档", choose: "选择配置档", newDraft: "新的未保存配置档", new: "新建配置档",
|
|
29
|
+
profileId: "配置档 ID(名称)", idHint: "使用 1–64 个小写字母、数字、连字符或下划线。保存后不能修改 ID。可在 JSONC 文档中添加可选的显示名称 label。",
|
|
30
|
+
configuration: "运行时配置(JSONC)", configurationHint: "文档包含 version: 1、相同的 id、可选 label 和 settings。支持 defaultActive、roleRouting、workflow、guards、runtimeRecovery,以及两个 DeepSeek 系列的校准、默认推理强度和最高强度预设策略。",
|
|
31
|
+
structuralHint: "角色、技能、模式名称、提示顺序或内容、预设安装、LSP、提供商和账户由原生部署配置管理,不属于配置档。路由可引用已有提供商;请勿粘贴凭证。",
|
|
32
|
+
save: "保存配置档", saving: "正在保存配置档…", apply: "应用已保存配置档", applying: "正在应用配置档…", reset: "重置为基线", resetting: "正在重置为基线…",
|
|
33
|
+
refresh: "刷新配置档", refreshing: "正在刷新配置档…", reload: "重新加载已保存配置档", loading: "正在加载配置档…", reading: "正在读取配置档…",
|
|
34
|
+
empty: "尚无已保存的配置档。可新建配置档;当前仍应用部署基线。",
|
|
35
|
+
baseline: "新会话使用:部署基线。", appliedProfile: "新会话使用:{id}(修订 {revision})。",
|
|
36
|
+
appliedInvalid: "无法确认保存的选择。已有会话未改变。请先解决 Host 诊断,再应用或重置配置档。",
|
|
37
|
+
selectionConflict: "保存的选择已被此 Host 之外的操作修改。此 Host 的新会话仍使用上方策略。请应用已保存配置档或重置为基线以协调选择;重启将采用保存的选择。已有会话未改变。",
|
|
38
|
+
dirty: "有未保存的更改。请先保存再应用;仅保存不会应用此配置档。", savedNotApplied: "已保存;此修订尚未应用到新会话。", savedApplied: "此已保存修订已应用到新会话。",
|
|
39
|
+
saved: "已保存 {id},未改变已应用的策略。", applied: "已为新会话应用 {id},已有会话未改变。", resetDone: "已为新会话重置为部署基线,已有会话未改变。",
|
|
40
|
+
discardPrompt: "切换编辑器之前,是否丢弃未保存的草稿?", discard: "丢弃更改", cancel: "取消",
|
|
41
|
+
conflict: "已保存文件或选择已被其他操作修改。草稿和原选择已保留。请刷新配置档,然后重新加载已保存配置档或检查草稿后重试。",
|
|
42
|
+
validation: "此配置档无效。请修正下方字段;草稿未改变。",
|
|
43
|
+
io: "Host 无法提交此操作。草稿和原选择已保留。请检查配置档存储权限,刷新后重试。",
|
|
44
|
+
unavailable: "原生配置档服务不可用。草稿已保留。Host 重新连接或启用 Deepwork 后请刷新。",
|
|
45
|
+
transport: "原生连接无法确认此操作。草稿已保留。重试之前请刷新 Host 状态;不要假定保存或应用已完成。",
|
|
46
|
+
invalidProfile: "不可用配置档:{id}", details: "Host 诊断", retry: "请解决诊断问题,刷新配置档后重试。",
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=locales.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Geometry and theme aliases extracted in dsmm/DESIGN.md; scoped to this section. */
|
|
2
|
+
export declare const PROFILE_STYLES = "\n.dsmm-profiles{width:100%;max-width:760px;min-width:0;display:flex;flex-direction:column;gap:12px;font-family:var(--dsw-font-family);font-size:14px;line-height:22px;color:var(--dsw-alias-label-primary)}\n.dsmm-profiles h2{margin:0;font-size:18px;font-weight:600}\n.dsmm-profiles p{margin:0;overflow-wrap:anywhere}\n.dsmm-profiles .dsmm-hint{color:var(--dsw-alias-label-secondary)}\n.dsmm-profiles .dsmm-field{min-width:0;display:flex;flex-direction:column;gap:6px}\n.dsmm-profiles .dsmm-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}\n.dsmm-profiles .dsmm-actions>button{max-width:100%;white-space:normal;overflow-wrap:anywhere;min-height:36px;height:auto}\n.dsmm-profiles .dsmm-input{width:100%;min-width:0;box-sizing:border-box;border-color:var(--dsw-alias-label-secondary)}\n.dsmm-profiles .dsmm-input input{width:100%;min-width:0;font:inherit;color:inherit}\n.dsmm-profiles select,.dsmm-profiles textarea{box-sizing:border-box;min-width:0;max-width:100%;font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-label-secondary);border-radius:var(--dsw-radius-md)}\n.dsmm-profiles select{width:240px;height:32px;padding:0 10px;text-overflow:ellipsis}\n.dsmm-profiles textarea{width:100%;padding:12px;font-family:var(--ds-font-family-code);resize:vertical;overflow:auto;white-space:pre;}\n.dsmm-profiles select:hover:not(:disabled),.dsmm-profiles textarea:hover:not(:disabled){border-color:var(--dsw-alias-label-primary)}\n.dsmm-profiles select:active:not(:disabled){background:var(--dsw-alias-interactive-bg-active)}\n.dsmm-profiles :is(select,textarea,button):focus-visible,.dsmm-profiles .dsmm-input:has(input:focus-visible){outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsmm-profiles :is(select,textarea):disabled{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform);cursor:not-allowed}\n.dsmm-profiles .dsmm-editor,.dsmm-profiles .dsmm-confirm{min-width:0;display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform)}\n.dsmm-profiles .dsmm-issue{padding:12px;border-left:4px solid var(--dsw-alias-state-error-primary);color:var(--dsw-alias-label-primary);overflow-wrap:anywhere}\n.dsmm-profiles .dsmm-issue p+p{margin-top:8px}\n.dsmm-profiles .dsmm-status{min-height:22px}\n@media(prefers-reduced-motion:reduce){.dsmm-profiles *{transition:none!important;animation:none!important}}\n";
|
|
3
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Geometry and theme aliases extracted in dsmm/DESIGN.md; scoped to this section. */
|
|
2
|
+
export const PROFILE_STYLES = `
|
|
3
|
+
.dsmm-profiles{width:100%;max-width:760px;min-width:0;display:flex;flex-direction:column;gap:12px;font-family:var(--dsw-font-family);font-size:14px;line-height:22px;color:var(--dsw-alias-label-primary)}
|
|
4
|
+
.dsmm-profiles h2{margin:0;font-size:18px;font-weight:600}
|
|
5
|
+
.dsmm-profiles p{margin:0;overflow-wrap:anywhere}
|
|
6
|
+
.dsmm-profiles .dsmm-hint{color:var(--dsw-alias-label-secondary)}
|
|
7
|
+
.dsmm-profiles .dsmm-field{min-width:0;display:flex;flex-direction:column;gap:6px}
|
|
8
|
+
.dsmm-profiles .dsmm-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
|
|
9
|
+
.dsmm-profiles .dsmm-actions>button{max-width:100%;white-space:normal;overflow-wrap:anywhere;min-height:36px;height:auto}
|
|
10
|
+
.dsmm-profiles .dsmm-input{width:100%;min-width:0;box-sizing:border-box;border-color:var(--dsw-alias-label-secondary)}
|
|
11
|
+
.dsmm-profiles .dsmm-input input{width:100%;min-width:0;font:inherit;color:inherit}
|
|
12
|
+
.dsmm-profiles select,.dsmm-profiles textarea{box-sizing:border-box;min-width:0;max-width:100%;font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-label-secondary);border-radius:var(--dsw-radius-md)}
|
|
13
|
+
.dsmm-profiles select{width:240px;height:32px;padding:0 10px;text-overflow:ellipsis}
|
|
14
|
+
.dsmm-profiles textarea{width:100%;padding:12px;font-family:var(--ds-font-family-code);resize:vertical;overflow:auto;white-space:pre;}
|
|
15
|
+
.dsmm-profiles select:hover:not(:disabled),.dsmm-profiles textarea:hover:not(:disabled){border-color:var(--dsw-alias-label-primary)}
|
|
16
|
+
.dsmm-profiles select:active:not(:disabled){background:var(--dsw-alias-interactive-bg-active)}
|
|
17
|
+
.dsmm-profiles :is(select,textarea,button):focus-visible,.dsmm-profiles .dsmm-input:has(input:focus-visible){outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}
|
|
18
|
+
.dsmm-profiles :is(select,textarea):disabled{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform);cursor:not-allowed}
|
|
19
|
+
.dsmm-profiles .dsmm-editor,.dsmm-profiles .dsmm-confirm{min-width:0;display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform)}
|
|
20
|
+
.dsmm-profiles .dsmm-issue{padding:12px;border-left:4px solid var(--dsw-alias-state-error-primary);color:var(--dsw-alias-label-primary);overflow-wrap:anywhere}
|
|
21
|
+
.dsmm-profiles .dsmm-issue p+p{margin-top:8px}
|
|
22
|
+
.dsmm-profiles .dsmm-status{min-height:22px}
|
|
23
|
+
@media(prefers-reduced-motion:reduce){.dsmm-profiles *{transition:none!important;animation:none!important}}
|
|
24
|
+
`;
|
|
25
|
+
//# sourceMappingURL=styles.js.map
|