@morlay/dsh-session-mode 0.0.6 → 0.0.8
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 +33 -16
- package/dist/catalog-remote-B-NMi_vS.mjs +21 -0
- package/dist/client.cjs +2623 -1714
- package/dist/client.d.cts +473 -4
- package/dist/client.d.mts +473 -4
- package/dist/index.d.cts +3 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.mjs +160 -24
- package/dist/rows.mjs +39 -28
- package/package.json +15 -3
- package/src/catalog-remote.ts +45 -0
- package/src/catalog.ts +75 -0
- package/src/client/BundleConfigPage.tsx +630 -0
- package/src/client/SessionModeSeat.tsx +21 -19
- package/src/client/bundle-config.ts +701 -0
- package/src/client/bundle-locales.ts +214 -0
- package/src/client/index.ts +180 -72
- package/src/client/llm-directory.ts +146 -0
- package/src/client/locales.ts +2 -2
- package/src/index.ts +25 -11
- package/src/mode-sources.ts +20 -6
- package/src/modes.ts +46 -21
- package/src/rows.ts +3 -2
- package/src/scope.ts +4 -5
- package/dist/shared-DX2Giyh3.mjs +0 -5
- package/src/client/SessionModeSeat.module.css +0 -74
|
@@ -7,7 +7,10 @@ import {
|
|
|
7
7
|
IconAgentPresetOutlineRegular,
|
|
8
8
|
IconChevronDownOutlineRegular,
|
|
9
9
|
Menu,
|
|
10
|
-
|
|
10
|
+
SeatButton,
|
|
11
|
+
Stack,
|
|
12
|
+
Text,
|
|
13
|
+
} from "@morlay/dsh-client-ui-primitives/client";
|
|
11
14
|
import type { PropsLocale, PropsRuntime } from "@deepseek-ai/dsh-client-ui-slots";
|
|
12
15
|
// Type-only:拉入本包 host 半的 Context / 投影声明(`sessionMode`),让 `projectionValues` 有类型。
|
|
13
16
|
import type {} from "../index.ts";
|
|
@@ -15,7 +18,6 @@ import type {} from "../index.ts";
|
|
|
15
18
|
import type {} from "@deepseek-ai/dsh-client-ui-conversation/client";
|
|
16
19
|
import { selectMode } from "./api.ts";
|
|
17
20
|
import { useRoster } from "./use-roster.ts";
|
|
18
|
-
import css from "./SessionModeSeat.module.css";
|
|
19
21
|
|
|
20
22
|
// 完整 props:composer 工具行左侧槽位的运行时 props + 本包的字典。
|
|
21
23
|
export type SessionModeSeatProps = PropsRuntime<"conversation.input.left"> &
|
|
@@ -50,10 +52,12 @@ export function SessionModeSeat({ sessionId, useSessions, t }: SessionModeSeatPr
|
|
|
50
52
|
// 开过 turn 的会话只读:chip 只写当前模式、点不动(判据与 host 拒绝切换读的是同一个投影)。
|
|
51
53
|
if (editable === false) {
|
|
52
54
|
return (
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
<SeatButton
|
|
56
|
+
disabled
|
|
57
|
+
title={t("lockedHint")}
|
|
58
|
+
icon={<IconAgentPresetOutlineRegular />}
|
|
59
|
+
label={label}
|
|
60
|
+
/>
|
|
57
61
|
);
|
|
58
62
|
}
|
|
59
63
|
|
|
@@ -66,10 +70,12 @@ export function SessionModeSeat({ sessionId, useSessions, t }: SessionModeSeatPr
|
|
|
66
70
|
items={roster.modes.map((mode) => ({
|
|
67
71
|
id: mode.id,
|
|
68
72
|
label: (
|
|
69
|
-
<
|
|
70
|
-
<
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
+
<Stack gap={2}>
|
|
74
|
+
<Text size="md">{mode.name}</Text>
|
|
75
|
+
<Text size="sm" tone="tertiary">
|
|
76
|
+
{mode.description ?? t("noDescription")}
|
|
77
|
+
</Text>
|
|
78
|
+
</Stack>
|
|
73
79
|
),
|
|
74
80
|
}))}
|
|
75
81
|
selectedId={current}
|
|
@@ -88,23 +94,19 @@ export function SessionModeSeat({ sessionId, useSessions, t }: SessionModeSeatPr
|
|
|
88
94
|
}}
|
|
89
95
|
align="start"
|
|
90
96
|
portal
|
|
91
|
-
className={css.menuAnchor}
|
|
92
97
|
anchor={
|
|
93
|
-
<
|
|
94
|
-
type="button"
|
|
95
|
-
className={css.seat}
|
|
98
|
+
<SeatButton
|
|
96
99
|
aria-haspopup="menu"
|
|
97
100
|
aria-expanded={open}
|
|
98
101
|
title={error ?? t("seatHint")}
|
|
99
102
|
disabled={busy}
|
|
103
|
+
icon={<IconAgentPresetOutlineRegular />}
|
|
104
|
+
label={label}
|
|
105
|
+
chevron={<IconChevronDownOutlineRegular />}
|
|
100
106
|
onClick={() => {
|
|
101
107
|
setOpen((value) => !value);
|
|
102
108
|
}}
|
|
103
|
-
|
|
104
|
-
<IconAgentPresetOutlineRegular className={css.seatIcon} />
|
|
105
|
-
<span className={css.seatLabel}>{label}</span>
|
|
106
|
-
<IconChevronDownOutlineRegular className={css.chevron} />
|
|
107
|
-
</button>
|
|
109
|
+
/>
|
|
108
110
|
}
|
|
109
111
|
/>
|
|
110
112
|
);
|