@wowyuarm/dsh-agent-team 0.1.3 → 0.1.5
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 +7 -1
- package/README.zh.md +12 -3
- package/package.json +1 -1
- package/packages/agent-team/README.md +3 -3
- package/packages/agent-team/README.zh.md +3 -3
- package/packages/agent-team/lib/auto-compaction.js +39 -1
- package/packages/agent-team/lib/index.js +123 -14
- package/packages/agent-team/lib/ledger.js +355 -110
- package/packages/agent-team/lib/spec.js +39 -11
- package/packages/agent-team/lib/typert.host.js +257 -86
- package/packages/agent-team/lib/typert.remote-client.d.ts +5 -1
- package/packages/agent-team/lib/typert.remote-client.d.ts.map +1 -1
- package/packages/agent-team/lib/typert.remote-client.js +196 -59
- package/packages/agent-team/lib/types/auto-compaction.d.ts +9 -0
- package/packages/agent-team/lib/types/auto-compaction.d.ts.map +1 -1
- package/packages/agent-team/lib/types/index.d.ts +24 -7
- package/packages/agent-team/lib/types/index.d.ts.map +1 -1
- package/packages/agent-team/lib/types/ledger.d.ts +36 -2
- package/packages/agent-team/lib/types/ledger.d.ts.map +1 -1
- package/packages/agent-team/lib/types/spec.d.ts.map +1 -1
- package/packages/agent-team/lib/types/types.d.ts +109 -30
- package/packages/agent-team/lib/types/types.d.ts.map +1 -1
- package/packages/agent-team/preset/team-member/agent.cordis.yml +1 -1
- package/packages/client-agent-team/README.md +2 -1
- package/packages/client-agent-team/README.zh.md +2 -1
- package/packages/client-agent-team/lib/client.js +1082 -380
- package/packages/client-agent-team/lib/client.js.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.d.ts +2 -1
- package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.js +73 -15
- package/packages/client-agent-team/lib/types/client/TeamChannelPage.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamChannelPage.js +34 -10
- package/packages/client-agent-team/lib/types/client/TeamChannelsPanel.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamChannelsPanel.js +3 -1
- package/packages/client-agent-team/lib/types/client/TeamComposer.d.ts +6 -1
- package/packages/client-agent-team/lib/types/client/TeamComposer.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamComposer.js +76 -20
- package/packages/client-agent-team/lib/types/client/TeamConversation.d.ts +1 -1
- package/packages/client-agent-team/lib/types/client/TeamConversation.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamConversation.js +3 -3
- package/packages/client-agent-team/lib/types/client/TeamMemberSessionComposer.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamMemberSessionComposer.js +16 -1
- package/packages/client-agent-team/lib/types/client/TeamMessage.d.ts +4 -1
- package/packages/client-agent-team/lib/types/client/TeamMessage.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamMessage.js +62 -25
- package/packages/client-agent-team/lib/types/client/TeamRowMenu.d.ts +3 -2
- package/packages/client-agent-team/lib/types/client/TeamRowMenu.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamSidebarSection.d.ts +5 -2
- package/packages/client-agent-team/lib/types/client/TeamSidebarSection.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamSidebarSection.js +2 -4
- package/packages/client-agent-team/lib/types/client/TeamThreadPage.d.ts +2 -1
- package/packages/client-agent-team/lib/types/client/TeamThreadPage.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamThreadPage.js +92 -18
- package/packages/client-agent-team/lib/types/client/TeamWorkspaceBrowser.d.ts +1 -1
- package/packages/client-agent-team/lib/types/client/TeamWorkspaceBrowser.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamWorkspaceBrowser.js +5 -2
- package/packages/client-agent-team/lib/types/client/index.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/index.js +16 -13
- package/packages/client-agent-team/lib/types/client/locales.d.ts +40 -0
- package/packages/client-agent-team/lib/types/client/locales.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/locales.js +40 -0
- package/packages/client-agent-team/lib/types/client/navigation.d.ts +1 -1
- package/packages/client-agent-team/lib/types/client/navigation.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/navigation.js +12 -6
- package/packages/client-agent-team/lib/types/client/sidebar-sections.d.ts +16 -0
- package/packages/client-agent-team/lib/types/client/sidebar-sections.d.ts.map +1 -0
- package/packages/client-agent-team/lib/types/client/sidebar-sections.js +102 -0
- package/packages/client-agent-team/lib/types/client/slots.d.ts +3 -1
- package/packages/client-agent-team/lib/types/client/slots.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/task-refs.d.ts +1 -1
- package/packages/client-agent-team/lib/types/client/task-refs.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/task-refs.js +1 -1
- package/packages/client-agent-team/lib/types/client/team-formatters.d.ts +9 -0
- package/packages/client-agent-team/lib/types/client/team-formatters.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/team-formatters.js +22 -2
- package/packages/tool-agent-team/README.md +7 -7
- package/packages/tool-agent-team/README.zh.md +7 -7
- package/packages/tool-agent-team/lib/index.js +38 -28
- package/packages/tool-agent-team/lib/types/index.d.ts.map +1 -1
|
@@ -2,10 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect, useRef, useState, useSyncExternalStore } from 'react';
|
|
3
3
|
import { IconAgentPresetOutline16, IconListPenOutline16, Tooltip } from '@deepseek-ai/dsh-client-ui-primitives';
|
|
4
4
|
import { TeamWorkspaceRow } from "./TeamWorkspaceRow.js";
|
|
5
|
+
import { TeamSidebarSection } from "./TeamSidebarSection.js";
|
|
6
|
+
import { useSidebarSectionOpen, setSidebarSectionOpen } from "./sidebar-sections.js";
|
|
5
7
|
import { TeamAgentsPanel } from "./TeamAgentsPanel.js";
|
|
6
8
|
import { TeamChannelsPanel } from "./TeamChannelsPanel.js";
|
|
7
9
|
import css from './sidebar.module.css';
|
|
8
|
-
export function TeamWorkspaceBrowser({ wide, expandSidebar, navigation, selectWorkspace, selectChannel, t, useWorkspaces, loadMembers, subscribeChanges, addMember, loadChannels, createChannel, updateChannel, updateMember, recoverMember, joinChannel, removeChannelMember, loadModels, openMemberSession }) {
|
|
10
|
+
export function TeamWorkspaceBrowser({ wide, expandSidebar, navigation, selectWorkspace, selectChannel, t, useWorkspaces, loadMembers, subscribeChanges, addMember, loadChannels, createChannel, updateChannel, updateMember, recoverMember, clearMemberContext, joinChannel, removeChannelMember, loadModels, openMemberSession }) {
|
|
9
11
|
const navigationState = useSyncExternalStore(navigation.subscribe, navigation.getSnapshot, navigation.getSnapshot);
|
|
10
12
|
const workspaces = useWorkspaces(state => state.items);
|
|
11
13
|
const selected = navigationState.workspaceId;
|
|
@@ -21,6 +23,7 @@ export function TeamWorkspaceBrowser({ wide, expandSidebar, navigation, selectWo
|
|
|
21
23
|
const [pendingSection, setPendingSection] = useState();
|
|
22
24
|
const channelsRef = useRef(null);
|
|
23
25
|
const agentsRef = useRef(null);
|
|
26
|
+
const workspacesOpen = useSidebarSectionOpen(undefined, 'workspaces');
|
|
24
27
|
useEffect(() => {
|
|
25
28
|
if (navigationState.mode === 'team' && selectedId !== undefined && selectedId !== selected) {
|
|
26
29
|
selectWorkspace(selectedId);
|
|
@@ -36,5 +39,5 @@ export function TeamWorkspaceBrowser({ wide, expandSidebar, navigation, selectWo
|
|
|
36
39
|
if (!wide) {
|
|
37
40
|
return _jsxs("nav", { className: css.railWorkspace, "aria-label": t('workspaceSections'), children: [_jsx(Tooltip, { label: t('channels'), side: "right", children: _jsx("button", { type: "button", className: css.railButton, "aria-label": t('channels'), onClick: () => { setPendingSection('channels'); expandSidebar(); }, children: _jsx(IconListPenOutline16, { size: 16 }) }) }), _jsx(Tooltip, { label: t('agents'), side: "right", children: _jsx("button", { type: "button", className: css.railButton, "aria-label": t('agents'), onClick: () => { setPendingSection('agents'); expandSidebar(); }, children: _jsx(IconAgentPresetOutline16, { size: 16 }) }) })] });
|
|
38
41
|
}
|
|
39
|
-
return _jsxs("section", { className: css.workspaceBrowser, "aria-label": t('workspaces'), children: [_jsx(
|
|
42
|
+
return _jsxs("section", { className: css.workspaceBrowser, "aria-label": t('workspaces'), children: [_jsx(TeamSidebarSection, { title: t('workspaces'), open: workspacesOpen, onToggle: open => { setSidebarSectionOpen(undefined, 'workspaces', open); }, children: _jsxs("div", { className: css.workspaceList, children: [workspaces.map(workspace => _jsx(TeamWorkspaceRow, { workspaceId: workspace.workspaceId, title: workspace.title, path: workspace.path, selected: workspace.workspaceId === selectedId, current: workspace.workspaceId === selectedId && overviewIsCurrent, onSelect: selectWorkspace }, workspace.workspaceId)), workspaces.length === 0 && _jsx("p", { className: css.emptyState, children: t('empty') })] }) }), selectedId !== undefined && _jsxs("div", { className: css.workspaceSection, children: [_jsx("div", { ref: channelsRef, children: _jsx(TeamChannelsPanel, { workspaceId: selectedId, loadMembers: loadMembers, loadChannels: loadChannels, subscribeChanges: subscribeChanges, createChannel: createChannel, updateChannel: updateChannel, joinChannel: joinChannel, removeChannelMember: removeChannelMember, creatingAgents: creatingAgents.filter(request => request.workspaceId === selectedId), ...(navigationState.memberSessionId !== undefined || navigationState.channelRef === undefined ? {} : { selectedChannelRef: navigationState.channelRef }), selectChannel: selectChannel, t: t }, selectedId) }), _jsx("div", { ref: agentsRef, children: _jsx(TeamAgentsPanel, { workspaceId: selectedId, loadMembers: loadMembers, subscribeChanges: subscribeChanges, loadChannels: loadChannels, addMember: addMember, updateMember: updateMember, recoverMember: recoverMember, clearMemberContext: clearMemberContext, joinChannel: joinChannel, removeChannelMember: removeChannelMember, loadModels: loadModels, ...(navigationState.memberSessionId === undefined ? {} : { memberSessionId: navigationState.memberSessionId }), openMemberSession: openMemberSession, onCreatingChange: (request, creating) => { setCreatingAgents(current => creating ? [...current.filter(item => item.requestId !== request.requestId), request] : current.filter(item => item.requestId !== request.requestId)); }, t: t }, selectedId) })] })] });
|
|
40
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAa,MAAM,wCAAwC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAa,MAAM,wCAAwC,CAAA;AAiCtF,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAO5C,OAAO,EAAU,KAAK,OAAO,EAAE,MAAM,cAAc,CAAA;AAEnD,YAAY,EAAE,QAAQ,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAC9F,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAIhD,eAAO,MAAM,MAAM,UAElB,CAAA;AAED,OAAO,QAAQ,kCAAkC,CAAC;IAChD,UAAU,kBAAkB;QAC1B,IAAI,EAAE,OAAO,CAAA;KACd;CACF;AAED,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,OAAO;QACf,cAAc,EAAE,cAAc,CAAA;QAC9B,UAAU,EAAE,cAAc,CAAA;KAC3B;CACF;AA0ND,wBAAsB,KAAK,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAI7D"}
|
|
@@ -15,6 +15,19 @@ export const inject = [
|
|
|
15
15
|
'slots', 'workspaces', 'locale', 'remote', 'sessions', 'connection', 'conversation', 'inputTriggers',
|
|
16
16
|
];
|
|
17
17
|
function registerModeShadow(ctx, navigation, changes, drafts, name, component, extraInject) {
|
|
18
|
+
// Stay in Team mode: the conversation shadow stands down for Member Session
|
|
19
|
+
// views (see registerModeShadow), so the shipped conversation root renders
|
|
20
|
+
// the selected Member Session inside the Team shell.
|
|
21
|
+
const openMemberSessionImpl = (sessionId) => {
|
|
22
|
+
const sessions = ctx.sessions;
|
|
23
|
+
const snapshot = navigation.getSnapshot();
|
|
24
|
+
const current = sessions.list.getSnapshot().current;
|
|
25
|
+
// The return target is captured on first entry only — switching between
|
|
26
|
+
// Member Sessions must keep pointing at the Human's original session.
|
|
27
|
+
const returnTo = snapshot.memberSessionId === undefined && current !== undefined && current !== sessionId ? current : undefined;
|
|
28
|
+
navigation.actions().enterMemberSession(sessionId, returnTo);
|
|
29
|
+
sessions.open(sessionId);
|
|
30
|
+
};
|
|
18
31
|
// Remote bindings shared by every Team slot; surface-specific entries extend it below.
|
|
19
32
|
const sharedRemotes = {
|
|
20
33
|
loadChannels: (request) => ctx.remote.agentTeam.view(request),
|
|
@@ -26,25 +39,14 @@ function registerModeShadow(ctx, navigation, changes, drafts, name, component, e
|
|
|
26
39
|
updateChannel: (request) => ctx.remote.agentTeam.updateChannel(request),
|
|
27
40
|
updateMember: (request) => ctx.remote.agentTeam.updateMember(request),
|
|
28
41
|
recoverMember: (request) => ctx.remote.agentTeam.recoverMember(request),
|
|
42
|
+
clearMemberContext: (request) => ctx.remote.agentTeam.clearMemberContext(request),
|
|
29
43
|
// The Host-scoped catalog needs no live Member, so suspended ones stay editable too.
|
|
30
44
|
loadModels: async () => {
|
|
31
45
|
const connection = ctx.get('connection');
|
|
32
46
|
const response = await connection.api.llm.models({});
|
|
33
47
|
return response.result;
|
|
34
48
|
},
|
|
35
|
-
openMemberSession:
|
|
36
|
-
// Stay in Team mode: the conversation shadow stands down for Member
|
|
37
|
-
// Session views (see registerModeShadow), so the shipped conversation
|
|
38
|
-
// root renders the selected Member Session inside the Team shell.
|
|
39
|
-
const sessions = ctx.sessions;
|
|
40
|
-
const snapshot = navigation.getSnapshot();
|
|
41
|
-
const current = sessions.list.getSnapshot().current;
|
|
42
|
-
// The return target is captured on first entry only — switching between
|
|
43
|
-
// Member Sessions must keep pointing at the Human's original session.
|
|
44
|
-
const returnTo = snapshot.memberSessionId === undefined && current !== undefined && current !== sessionId ? current : undefined;
|
|
45
|
-
navigation.actions().enterMemberSession(sessionId, returnTo);
|
|
46
|
-
sessions.open(sessionId);
|
|
47
|
-
},
|
|
49
|
+
openMemberSession: openMemberSessionImpl,
|
|
48
50
|
};
|
|
49
51
|
ctx.slots.inject(name, () => {
|
|
50
52
|
let dispose;
|
|
@@ -72,6 +74,7 @@ function registerModeShadow(ctx, navigation, changes, drafts, name, component, e
|
|
|
72
74
|
getAttachment: (request) => ctx.remote.agentTeam.getAttachment(request),
|
|
73
75
|
reply: (request) => ctx.remote.agentTeam.reply(request),
|
|
74
76
|
changeTask: (request) => ctx.remote.agentTeam.changeTask(request),
|
|
77
|
+
promoteThread: (request) => ctx.remote.agentTeam.promoteThread(request),
|
|
75
78
|
resolveTaskRefs: (request) => ctx.remote.agentTeam.resolveTaskRefs(request),
|
|
76
79
|
} : {}),
|
|
77
80
|
...(name === 'sidebar.workspaces' ? {
|
|
@@ -37,6 +37,16 @@ export declare const zh: {
|
|
|
37
37
|
readonly editChannel: "编辑频道";
|
|
38
38
|
readonly editAgent: "编辑 Agent";
|
|
39
39
|
readonly resumeAgent: "恢复";
|
|
40
|
+
readonly restartAgent: "重启";
|
|
41
|
+
readonly restartStillUnavailable: "重启已执行,成员仍不可用:{diagnostic}";
|
|
42
|
+
readonly restartFailed: "重启执行失败:{message}";
|
|
43
|
+
readonly clearContextAgent: "从全新上下文开始";
|
|
44
|
+
readonly clearContextWorkingReason: "成员正在工作中,完成后才能清空上下文";
|
|
45
|
+
readonly clearContextUnavailableReason: "成员当前不可用,恢复在线且空闲后才能清空上下文";
|
|
46
|
+
readonly clearContextTitle: "从全新上下文开始:{name}";
|
|
47
|
+
readonly clearContextNotice: "将结束 {name} 当前的会话上下文并从空白开始:旧对话会归档保留在会话记录中。{name} 的身份、私有记忆与 notes、频道和会话绑定都保持不变,后续协作从新上下文继续累积。";
|
|
48
|
+
readonly clearContextConfirm: "开始全新上下文";
|
|
49
|
+
readonly clearContextFailed: "清空上下文失败:{message}";
|
|
40
50
|
readonly optionalSuffix: "(可选)";
|
|
41
51
|
readonly agentDescriptionPlaceholder: "留空则暂无描述";
|
|
42
52
|
readonly channelsPickerEmpty: "选择初始频道";
|
|
@@ -49,6 +59,8 @@ export declare const zh: {
|
|
|
49
59
|
readonly removeFile: "移除 {name}";
|
|
50
60
|
readonly attachmentExpired: "文件已过期清理";
|
|
51
61
|
readonly viewImage: "查看大图 {name}";
|
|
62
|
+
readonly expandMessage: "展开全文";
|
|
63
|
+
readonly collapseMessage: "收起";
|
|
52
64
|
readonly actionsChannel: "{name} 的操作";
|
|
53
65
|
readonly actionsAgent: "{name} 的操作";
|
|
54
66
|
readonly editSave: "保存";
|
|
@@ -81,10 +93,17 @@ export declare const zh: {
|
|
|
81
93
|
readonly taskLabel: "Task #{number}";
|
|
82
94
|
readonly taskPending: "Task …";
|
|
83
95
|
readonly openTask: "打开 Task #{number}";
|
|
96
|
+
readonly openThread: "打开讨论";
|
|
97
|
+
readonly threadLabel: "讨论";
|
|
98
|
+
readonly asTask: "作为任务";
|
|
99
|
+
readonly promoteToTask: "转为 Task";
|
|
100
|
+
readonly promotingTask: "正在转为 Task…";
|
|
84
101
|
readonly mentionSuggestions: "提及成员建议";
|
|
102
|
+
readonly mentionAll: "通知所有成员({count})";
|
|
85
103
|
readonly messageDraft: "消息内容";
|
|
86
104
|
readonly composerNotify: "将通知:{ids}";
|
|
87
105
|
readonly messagePlaceholder: "写一条消息…";
|
|
106
|
+
readonly replyPlaceholder: "回复此 Thread…";
|
|
88
107
|
readonly sendMessage: "发送";
|
|
89
108
|
readonly sendingMessage: "发送中…";
|
|
90
109
|
readonly loadOlder: "加载更早消息";
|
|
@@ -115,6 +134,7 @@ export declare const zh: {
|
|
|
115
134
|
readonly activityClaimsReleased: "{actor} 因成员权限变化释放了 {count} 个 Claim";
|
|
116
135
|
readonly activityAccepted: "{actor} 验收了此 Task";
|
|
117
136
|
readonly activityAcceptedWithClaims: "{actor} 验收了此 Task,并一并完成了 {count} 个未完成 Claim";
|
|
137
|
+
readonly activityPromoted: "{actor} 为此讨论创建了 Task";
|
|
118
138
|
readonly acceptEarlyTitle: "提前验收任务";
|
|
119
139
|
readonly acceptEarlyBody: "将验收本 Task,并把以下 {count} 个未完成的 Claim 一并标记为完成:";
|
|
120
140
|
readonly acceptingTask: "验收中…";
|
|
@@ -165,6 +185,16 @@ export declare const en: {
|
|
|
165
185
|
readonly editChannel: "Edit Channel";
|
|
166
186
|
readonly editAgent: "Edit Agent";
|
|
167
187
|
readonly resumeAgent: "Resume";
|
|
188
|
+
readonly restartAgent: "Restart";
|
|
189
|
+
readonly restartStillUnavailable: "Restart ran, but the Member is still unavailable: {diagnostic}";
|
|
190
|
+
readonly restartFailed: "Restart failed: {message}";
|
|
191
|
+
readonly clearContextAgent: "Start from new context";
|
|
192
|
+
readonly clearContextWorkingReason: "The Member is working; clear once the current turn ends";
|
|
193
|
+
readonly clearContextUnavailableReason: "The Member is unavailable; only an idle available Member can start from a new context";
|
|
194
|
+
readonly clearContextTitle: "Start from new context: {name}";
|
|
195
|
+
readonly clearContextNotice: "This ends {name}'s current session context and starts blank: the previous conversation is archived and stays in the session history. {name}'s identity, private memory and notes, channel and session bindings are untouched, and future collaboration accumulates from the new context.";
|
|
196
|
+
readonly clearContextConfirm: "Start from new context";
|
|
197
|
+
readonly clearContextFailed: "Failed to clear context: {message}";
|
|
168
198
|
readonly optionalSuffix: " (optional)";
|
|
169
199
|
readonly agentDescriptionPlaceholder: "Leave empty if not needed";
|
|
170
200
|
readonly channelsPickerEmpty: "Choose initial channels";
|
|
@@ -177,6 +207,8 @@ export declare const en: {
|
|
|
177
207
|
readonly removeFile: "Remove {name}";
|
|
178
208
|
readonly attachmentExpired: "File expired and cleaned up";
|
|
179
209
|
readonly viewImage: "View image {name}";
|
|
210
|
+
readonly expandMessage: "Show more";
|
|
211
|
+
readonly collapseMessage: "Show less";
|
|
180
212
|
readonly actionsChannel: "{name} actions";
|
|
181
213
|
readonly actionsAgent: "{name} actions";
|
|
182
214
|
readonly editSave: "Save";
|
|
@@ -209,10 +241,17 @@ export declare const en: {
|
|
|
209
241
|
readonly taskLabel: "Task #{number}";
|
|
210
242
|
readonly taskPending: "Task …";
|
|
211
243
|
readonly openTask: "Open Task #{number}";
|
|
244
|
+
readonly openThread: "Open thread";
|
|
245
|
+
readonly threadLabel: "Thread";
|
|
246
|
+
readonly asTask: "As task";
|
|
247
|
+
readonly promoteToTask: "Convert to Task";
|
|
248
|
+
readonly promotingTask: "Converting to Task…";
|
|
212
249
|
readonly mentionSuggestions: "Mention suggestions";
|
|
250
|
+
readonly mentionAll: "Notify all members ({count})";
|
|
213
251
|
readonly messageDraft: "Message";
|
|
214
252
|
readonly composerNotify: "Will notify: {ids}";
|
|
215
253
|
readonly messagePlaceholder: "Write a message…";
|
|
254
|
+
readonly replyPlaceholder: "Reply on this Thread…";
|
|
216
255
|
readonly sendMessage: "Send";
|
|
217
256
|
readonly sendingMessage: "Sending…";
|
|
218
257
|
readonly loadOlder: "Load older messages";
|
|
@@ -243,6 +282,7 @@ export declare const en: {
|
|
|
243
282
|
readonly activityClaimsReleased: "{actor} released {count} Claim(s) after a membership change";
|
|
244
283
|
readonly activityAccepted: "{actor} accepted this Task";
|
|
245
284
|
readonly activityAcceptedWithClaims: "{actor} accepted this Task and completed {count} unfinished Claims with it";
|
|
285
|
+
readonly activityPromoted: "{actor} created a Task for this Thread";
|
|
246
286
|
readonly acceptEarlyTitle: "Accept Task early";
|
|
247
287
|
readonly acceptEarlyBody: "This accepts the Task and marks the following {count} unfinished Claims as done:";
|
|
248
288
|
readonly acceptingTask: "Accepting…";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../src/client/locales.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../src/client/locales.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmJL,CAAA;AAEV,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmJL,CAAA;AAEV,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,EAAE,CAAA"}
|
|
@@ -37,6 +37,16 @@ export const zh = {
|
|
|
37
37
|
editChannel: '编辑频道',
|
|
38
38
|
editAgent: '编辑 Agent',
|
|
39
39
|
resumeAgent: '恢复',
|
|
40
|
+
restartAgent: '重启',
|
|
41
|
+
restartStillUnavailable: '重启已执行,成员仍不可用:{diagnostic}',
|
|
42
|
+
restartFailed: '重启执行失败:{message}',
|
|
43
|
+
clearContextAgent: '从全新上下文开始',
|
|
44
|
+
clearContextWorkingReason: '成员正在工作中,完成后才能清空上下文',
|
|
45
|
+
clearContextUnavailableReason: '成员当前不可用,恢复在线且空闲后才能清空上下文',
|
|
46
|
+
clearContextTitle: '从全新上下文开始:{name}',
|
|
47
|
+
clearContextNotice: '将结束 {name} 当前的会话上下文并从空白开始:旧对话会归档保留在会话记录中。{name} 的身份、私有记忆与 notes、频道和会话绑定都保持不变,后续协作从新上下文继续累积。',
|
|
48
|
+
clearContextConfirm: '开始全新上下文',
|
|
49
|
+
clearContextFailed: '清空上下文失败:{message}',
|
|
40
50
|
optionalSuffix: '(可选)',
|
|
41
51
|
agentDescriptionPlaceholder: '留空则暂无描述',
|
|
42
52
|
channelsPickerEmpty: '选择初始频道',
|
|
@@ -49,6 +59,8 @@ export const zh = {
|
|
|
49
59
|
removeFile: '移除 {name}',
|
|
50
60
|
attachmentExpired: '文件已过期清理',
|
|
51
61
|
viewImage: '查看大图 {name}',
|
|
62
|
+
expandMessage: '展开全文',
|
|
63
|
+
collapseMessage: '收起',
|
|
52
64
|
actionsChannel: '{name} 的操作',
|
|
53
65
|
actionsAgent: '{name} 的操作',
|
|
54
66
|
editSave: '保存',
|
|
@@ -81,10 +93,17 @@ export const zh = {
|
|
|
81
93
|
taskLabel: 'Task #{number}',
|
|
82
94
|
taskPending: 'Task …',
|
|
83
95
|
openTask: '打开 Task #{number}',
|
|
96
|
+
openThread: '打开讨论',
|
|
97
|
+
threadLabel: '讨论',
|
|
98
|
+
asTask: '作为任务',
|
|
99
|
+
promoteToTask: '转为 Task',
|
|
100
|
+
promotingTask: '正在转为 Task…',
|
|
84
101
|
mentionSuggestions: '提及成员建议',
|
|
102
|
+
mentionAll: '通知所有成员({count})',
|
|
85
103
|
messageDraft: '消息内容',
|
|
86
104
|
composerNotify: '将通知:{ids}',
|
|
87
105
|
messagePlaceholder: '写一条消息…',
|
|
106
|
+
replyPlaceholder: '回复此 Thread…',
|
|
88
107
|
sendMessage: '发送',
|
|
89
108
|
sendingMessage: '发送中…',
|
|
90
109
|
loadOlder: '加载更早消息',
|
|
@@ -115,6 +134,7 @@ export const zh = {
|
|
|
115
134
|
activityClaimsReleased: '{actor} 因成员权限变化释放了 {count} 个 Claim',
|
|
116
135
|
activityAccepted: '{actor} 验收了此 Task',
|
|
117
136
|
activityAcceptedWithClaims: '{actor} 验收了此 Task,并一并完成了 {count} 个未完成 Claim',
|
|
137
|
+
activityPromoted: '{actor} 为此讨论创建了 Task',
|
|
118
138
|
acceptEarlyTitle: '提前验收任务',
|
|
119
139
|
acceptEarlyBody: '将验收本 Task,并把以下 {count} 个未完成的 Claim 一并标记为完成:',
|
|
120
140
|
acceptingTask: '验收中…',
|
|
@@ -165,6 +185,16 @@ export const en = {
|
|
|
165
185
|
editChannel: 'Edit Channel',
|
|
166
186
|
editAgent: 'Edit Agent',
|
|
167
187
|
resumeAgent: 'Resume',
|
|
188
|
+
restartAgent: 'Restart',
|
|
189
|
+
restartStillUnavailable: 'Restart ran, but the Member is still unavailable: {diagnostic}',
|
|
190
|
+
restartFailed: 'Restart failed: {message}',
|
|
191
|
+
clearContextAgent: 'Start from new context',
|
|
192
|
+
clearContextWorkingReason: 'The Member is working; clear once the current turn ends',
|
|
193
|
+
clearContextUnavailableReason: 'The Member is unavailable; only an idle available Member can start from a new context',
|
|
194
|
+
clearContextTitle: 'Start from new context: {name}',
|
|
195
|
+
clearContextNotice: 'This ends {name}\'s current session context and starts blank: the previous conversation is archived and stays in the session history. {name}\'s identity, private memory and notes, channel and session bindings are untouched, and future collaboration accumulates from the new context.',
|
|
196
|
+
clearContextConfirm: 'Start from new context',
|
|
197
|
+
clearContextFailed: 'Failed to clear context: {message}',
|
|
168
198
|
optionalSuffix: ' (optional)',
|
|
169
199
|
agentDescriptionPlaceholder: 'Leave empty if not needed',
|
|
170
200
|
channelsPickerEmpty: 'Choose initial channels',
|
|
@@ -177,6 +207,8 @@ export const en = {
|
|
|
177
207
|
removeFile: 'Remove {name}',
|
|
178
208
|
attachmentExpired: 'File expired and cleaned up',
|
|
179
209
|
viewImage: 'View image {name}',
|
|
210
|
+
expandMessage: 'Show more',
|
|
211
|
+
collapseMessage: 'Show less',
|
|
180
212
|
actionsChannel: '{name} actions',
|
|
181
213
|
actionsAgent: '{name} actions',
|
|
182
214
|
editSave: 'Save',
|
|
@@ -209,10 +241,17 @@ export const en = {
|
|
|
209
241
|
taskLabel: 'Task #{number}',
|
|
210
242
|
taskPending: 'Task …',
|
|
211
243
|
openTask: 'Open Task #{number}',
|
|
244
|
+
openThread: 'Open thread',
|
|
245
|
+
threadLabel: 'Thread',
|
|
246
|
+
asTask: 'As task',
|
|
247
|
+
promoteToTask: 'Convert to Task',
|
|
248
|
+
promotingTask: 'Converting to Task…',
|
|
212
249
|
mentionSuggestions: 'Mention suggestions',
|
|
250
|
+
mentionAll: 'Notify all members ({count})',
|
|
213
251
|
messageDraft: 'Message',
|
|
214
252
|
composerNotify: 'Will notify: {ids}',
|
|
215
253
|
messagePlaceholder: 'Write a message…',
|
|
254
|
+
replyPlaceholder: 'Reply on this Thread…',
|
|
216
255
|
sendMessage: 'Send',
|
|
217
256
|
sendingMessage: 'Sending…',
|
|
218
257
|
loadOlder: 'Load older messages',
|
|
@@ -243,6 +282,7 @@ export const en = {
|
|
|
243
282
|
activityClaimsReleased: '{actor} released {count} Claim(s) after a membership change',
|
|
244
283
|
activityAccepted: '{actor} accepted this Task',
|
|
245
284
|
activityAcceptedWithClaims: '{actor} accepted this Task and completed {count} unfinished Claims with it',
|
|
285
|
+
activityPromoted: '{actor} created a Task for this Thread',
|
|
246
286
|
acceptEarlyTitle: 'Accept Task early',
|
|
247
287
|
acceptEarlyBody: 'This accepts the Task and marks the following {count} unfinished Claims as done:',
|
|
248
288
|
acceptingTask: 'Accepting…',
|
|
@@ -19,7 +19,7 @@ export interface TeamNavigationActions {
|
|
|
19
19
|
leaveTeam: () => void;
|
|
20
20
|
selectWorkspace: (workspaceId: WorkspaceId) => void;
|
|
21
21
|
selectChannel: (channelRef: AgentTeamChannelRef) => void;
|
|
22
|
-
selectThread: (
|
|
22
|
+
selectThread: (threadRef: AgentTeamThreadRef, channelRef?: AgentTeamChannelRef, taskRef?: AgentTeamTaskRef, taskNumber?: number) => void;
|
|
23
23
|
backToWorkspace: () => void;
|
|
24
24
|
/** Leave the selected Channel for the workspace Channel list; keeps mode and Workspace. */
|
|
25
25
|
backToChannels: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../src/client/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,E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AO;IAMf,OAAO,CAAC,gBAAgB;IAaxB,6EAA6E;IAC7E,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,SAAS;IAkBjB,OAAO,CAAC,MAAM;CAKf;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -4,14 +4,14 @@ function readSnapshot() {
|
|
|
4
4
|
return { mode: 'conversation' };
|
|
5
5
|
try {
|
|
6
6
|
const parsed = JSON.parse(localStorage.getItem(STORAGE_KEY) ?? '');
|
|
7
|
-
const hasThread = typeof parsed.
|
|
7
|
+
const hasThread = typeof parsed.threadRef === 'string';
|
|
8
8
|
return {
|
|
9
9
|
mode: parsed.mode === 'team' ? 'team' : 'conversation',
|
|
10
10
|
...(typeof parsed.workspaceId === 'string' ? { workspaceId: parsed.workspaceId } : {}),
|
|
11
11
|
...(typeof parsed.channelRef === 'string' ? { channelRef: parsed.channelRef } : {}),
|
|
12
12
|
...(hasThread ? {
|
|
13
|
-
taskRef: parsed.taskRef,
|
|
14
13
|
threadRef: parsed.threadRef,
|
|
14
|
+
...(typeof parsed.taskRef === 'string' ? { taskRef: parsed.taskRef } : {}),
|
|
15
15
|
...(typeof parsed.taskNumber === 'number' && Number.isInteger(parsed.taskNumber) && parsed.taskNumber > 0 ? { taskNumber: parsed.taskNumber } : {}),
|
|
16
16
|
} : {}),
|
|
17
17
|
};
|
|
@@ -53,7 +53,7 @@ export class TeamNavigation {
|
|
|
53
53
|
leaveTeam: () => { this.setMode('conversation'); },
|
|
54
54
|
selectWorkspace: workspaceId => { this.clearMemberSession(); this.setWorkspace(workspaceId); },
|
|
55
55
|
selectChannel: channelRef => { this.clearMemberSession(); this.setChannel(channelRef); },
|
|
56
|
-
selectThread: (
|
|
56
|
+
selectThread: (threadRef, channelRef, taskRef, taskNumber) => { this.clearMemberSession(); this.setThread(threadRef, channelRef, taskRef, taskNumber); },
|
|
57
57
|
backToWorkspace: () => { this.clearMemberSession(); this.setThread(undefined); },
|
|
58
58
|
backToChannels: () => { this.clearMemberSession(); this.clearChannel(); },
|
|
59
59
|
enterMemberSession: (sessionId, returnToSessionId) => { this.setMemberSession(sessionId, returnToSessionId); },
|
|
@@ -111,16 +111,22 @@ export class TeamNavigation {
|
|
|
111
111
|
this.snapshot = base;
|
|
112
112
|
this.commit();
|
|
113
113
|
}
|
|
114
|
-
setThread(
|
|
114
|
+
setThread(threadRef, channelRef, taskRef, taskNumber) {
|
|
115
115
|
if (this.snapshot.threadRef === threadRef && this.snapshot.taskRef === taskRef && this.snapshot.channelRef === channelRef && this.snapshot.taskNumber === taskNumber)
|
|
116
116
|
return;
|
|
117
|
-
if (threadRef === undefined
|
|
117
|
+
if (threadRef === undefined) {
|
|
118
118
|
const { taskRef: _taskRef, threadRef: _threadRef, taskNumber: _taskNumber, ...base } = this.snapshot;
|
|
119
119
|
this.snapshot = base;
|
|
120
120
|
}
|
|
121
121
|
else {
|
|
122
122
|
const { channelRef: _channelRef, taskRef: _taskRef, threadRef: _threadRef, taskNumber: _taskNumber, ...base } = this.snapshot;
|
|
123
|
-
this.snapshot = {
|
|
123
|
+
this.snapshot = {
|
|
124
|
+
...base,
|
|
125
|
+
threadRef,
|
|
126
|
+
...(channelRef === undefined ? {} : { channelRef }),
|
|
127
|
+
...(taskRef === undefined ? {} : { taskRef }),
|
|
128
|
+
...(taskNumber === undefined ? {} : { taskNumber }),
|
|
129
|
+
};
|
|
124
130
|
}
|
|
125
131
|
this.commit();
|
|
126
132
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { WorkspaceId } from '@deepseek-ai/dsh-client-runtime/client';
|
|
2
|
+
/** Which sidebar section a collapse state belongs to. */
|
|
3
|
+
export type TeamSidebarSectionKind = 'workspaces' | 'channels' | 'agents';
|
|
4
|
+
/**
|
|
5
|
+
* Effective expanded state for one sidebar section: `false` only when this
|
|
6
|
+
* browser explicitly collapsed it. Booleans are primitives, so the snapshot
|
|
7
|
+
* is naturally identity-stable for `useSyncExternalStore`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useSidebarSectionOpen(workspaceId: WorkspaceId | undefined, kind: TeamSidebarSectionKind): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* The only mutation path: record one section's expanded state for this
|
|
12
|
+
* browser. Unknown keys (missing workspace) no-op so an unloaded workspace
|
|
13
|
+
* never persists a phantom preference.
|
|
14
|
+
*/
|
|
15
|
+
export declare function setSidebarSectionOpen(workspaceId: WorkspaceId | undefined, kind: TeamSidebarSectionKind, open: boolean): void;
|
|
16
|
+
//# sourceMappingURL=sidebar-sections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-sections.d.ts","sourceRoot":"","sources":["../../../src/client/sidebar-sections.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAEzE,yDAAyD;AACzD,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG,UAAU,GAAG,QAAQ,CAAA;AA8DzE;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,WAAW,GAAG,SAAS,EAAE,IAAI,EAAE,sBAAsB,GAAG,OAAO,CASjH;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,WAAW,GAAG,SAAS,EAAE,IAAI,EAAE,sBAAsB,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAQ7H"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Human presentation preference for the Team sidebar: whether each disclosure
|
|
3
|
+
* section (workspaces / channels / agents) is expanded. The state lives in
|
|
4
|
+
* this browser only — it is UI taste, never a shared Team fact, so nothing
|
|
5
|
+
* here touches the ledger. Same storage discipline as `sidebar-order.ts`: one
|
|
6
|
+
* localStorage key, defensive parsing, a read-through cache over the raw
|
|
7
|
+
* payload so writes from other tabs are picked up, and an in-memory fallback
|
|
8
|
+
* when storage is unavailable.
|
|
9
|
+
*/
|
|
10
|
+
import { useCallback, useSyncExternalStore } from 'react';
|
|
11
|
+
const STORAGE_KEY = 'dsh.agent-team.sidebar-sections';
|
|
12
|
+
function sectionKey(workspaceId, kind) {
|
|
13
|
+
// The workspaces section is workspace-independent; the two panels are
|
|
14
|
+
// per-workspace because the Team shell remounts them on workspace switch.
|
|
15
|
+
return workspaceId === undefined ? (kind === 'workspaces' ? kind : undefined) : `${workspaceId}|${kind}`;
|
|
16
|
+
}
|
|
17
|
+
const MEMORY_ONLY = Symbol('sidebar-sections.memory');
|
|
18
|
+
/** Read-through parse cache over the raw persisted payload; see `sidebar-order.ts`. */
|
|
19
|
+
let cachedRaw;
|
|
20
|
+
let cachedCollapsed = new Set();
|
|
21
|
+
function storedCollapsed() {
|
|
22
|
+
let raw = null;
|
|
23
|
+
try {
|
|
24
|
+
raw = typeof localStorage === 'undefined' ? null : localStorage.getItem(STORAGE_KEY);
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
raw = null;
|
|
28
|
+
}
|
|
29
|
+
if (cachedRaw !== undefined && raw !== null && raw === cachedRaw)
|
|
30
|
+
return cachedCollapsed;
|
|
31
|
+
if (raw === null) {
|
|
32
|
+
if (cachedRaw === MEMORY_ONLY)
|
|
33
|
+
return cachedCollapsed;
|
|
34
|
+
cachedRaw = raw;
|
|
35
|
+
cachedCollapsed = new Set();
|
|
36
|
+
return cachedCollapsed;
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
const parsed = JSON.parse(raw);
|
|
40
|
+
if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed))
|
|
41
|
+
throw new Error('not an object');
|
|
42
|
+
const keys = parsed.collapsed;
|
|
43
|
+
if (!Array.isArray(keys) || !keys.every(key => typeof key === 'string'))
|
|
44
|
+
throw new Error('bad shape');
|
|
45
|
+
cachedRaw = raw;
|
|
46
|
+
cachedCollapsed = new Set(keys);
|
|
47
|
+
return cachedCollapsed;
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
// Corrupted payloads degrade to "no preference"; the next valid write
|
|
51
|
+
// replaces them.
|
|
52
|
+
return new Set();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function writeCollapsed(collapsed) {
|
|
56
|
+
cachedCollapsed = collapsed;
|
|
57
|
+
try {
|
|
58
|
+
if (typeof localStorage === 'undefined')
|
|
59
|
+
throw new Error('no localStorage');
|
|
60
|
+
const raw = JSON.stringify({ collapsed: [...collapsed] });
|
|
61
|
+
localStorage.setItem(STORAGE_KEY, raw);
|
|
62
|
+
cachedRaw = raw;
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
// Private mode and quota failures do not block folding; the session keeps
|
|
67
|
+
// serving the in-memory state above.
|
|
68
|
+
cachedRaw = MEMORY_ONLY;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const listeners = new Set();
|
|
72
|
+
/**
|
|
73
|
+
* Effective expanded state for one sidebar section: `false` only when this
|
|
74
|
+
* browser explicitly collapsed it. Booleans are primitives, so the snapshot
|
|
75
|
+
* is naturally identity-stable for `useSyncExternalStore`.
|
|
76
|
+
*/
|
|
77
|
+
export function useSidebarSectionOpen(workspaceId, kind) {
|
|
78
|
+
const key = sectionKey(workspaceId, kind);
|
|
79
|
+
const subscribe = useCallback((listener) => {
|
|
80
|
+
listeners.add(listener);
|
|
81
|
+
return () => { listeners.delete(listener); };
|
|
82
|
+
}, []);
|
|
83
|
+
return useSyncExternalStore(subscribe, () => key === undefined ? true : !storedCollapsed().has(key), () => key === undefined ? true : !storedCollapsed().has(key));
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The only mutation path: record one section's expanded state for this
|
|
87
|
+
* browser. Unknown keys (missing workspace) no-op so an unloaded workspace
|
|
88
|
+
* never persists a phantom preference.
|
|
89
|
+
*/
|
|
90
|
+
export function setSidebarSectionOpen(workspaceId, kind, open) {
|
|
91
|
+
const key = sectionKey(workspaceId, kind);
|
|
92
|
+
if (key === undefined)
|
|
93
|
+
return;
|
|
94
|
+
const next = new Set(storedCollapsed());
|
|
95
|
+
if (open)
|
|
96
|
+
next.delete(key);
|
|
97
|
+
else
|
|
98
|
+
next.add(key);
|
|
99
|
+
writeCollapsed(next);
|
|
100
|
+
for (const listener of listeners)
|
|
101
|
+
listener();
|
|
102
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
-
import type { AgentTeamAddMemberRequest, AgentTeamChannelRef, AgentTeamClientMemberStatus, AgentTeamCreateChannelRequest, AgentTeamCreateChannelResult, AgentTeamJoinChannelRequest, AgentTeamJoinChannelResult, AgentTeamGetAttachmentRequest, AgentTeamGetAttachmentResult, AgentTeamPutAttachmentRequest, AgentTeamPutAttachmentResult, AgentTeamMemberResult, AgentTeamRecoverMemberRequest, AgentTeamRecoverMemberResult, AgentTeamMembersRequest, AgentTeamRemoveChannelMemberRequest, AgentTeamRemoveChannelMemberResult, AgentTeamReplyRequest, AgentTeamResolveTaskRefsRequest, AgentTeamResolveTaskRefsResult, AgentTeamReplyResult, AgentTeamConfirmationRequired, AgentTeamThreadHistory, AgentTeamThreadHistoryRequest, AgentTeamThreadReadRequest, AgentTeamThreadReadResult, AgentTeamTaskRequest, AgentTeamTaskResult, AgentTeamSendMessageRequest, AgentTeamSendMessageResult, AgentTeamUpdateChannelRequest, AgentTeamUpdateChannelResult, AgentTeamUpdateMemberRequest, AgentTeamView, AgentTeamViewRequest } from '@wowyuarm/dsh-agent-team/types';
|
|
2
|
+
import type { AgentTeamAddMemberRequest, AgentTeamChannelRef, AgentTeamClientMemberStatus, AgentTeamClearMemberContextRequest, AgentTeamClearMemberContextResult, AgentTeamCreateChannelRequest, AgentTeamCreateChannelResult, AgentTeamJoinChannelRequest, AgentTeamJoinChannelResult, AgentTeamGetAttachmentRequest, AgentTeamGetAttachmentResult, AgentTeamPutAttachmentRequest, AgentTeamPutAttachmentResult, AgentTeamMemberResult, AgentTeamRecoverMemberRequest, AgentTeamRecoverMemberResult, AgentTeamMembersRequest, AgentTeamRemoveChannelMemberRequest, AgentTeamRemoveChannelMemberResult, AgentTeamReplyRequest, AgentTeamResolveTaskRefsRequest, AgentTeamResolveTaskRefsResult, AgentTeamReplyResult, AgentTeamConfirmationRequired, AgentTeamThreadHistory, AgentTeamThreadHistoryRequest, AgentTeamThreadReadRequest, AgentTeamThreadReadResult, AgentTeamPromoteThreadRequest, AgentTeamPromoteThreadResult, AgentTeamTaskRequest, AgentTeamTaskResult, AgentTeamSendMessageRequest, AgentTeamSendMessageResult, AgentTeamUpdateChannelRequest, AgentTeamUpdateChannelResult, AgentTeamUpdateMemberRequest, AgentTeamView, AgentTeamViewRequest } from '@wowyuarm/dsh-agent-team/types';
|
|
3
3
|
import type { RemoteResult } from '@deepseek-ai/dsh-typert-protocol';
|
|
4
4
|
import type { TeamNavigationActions, TeamNavigationSnapshot } from './navigation.ts';
|
|
5
5
|
import type { TeamChangeListener, TeamChangeScope } from './team-changes.ts';
|
|
@@ -49,6 +49,7 @@ export type TeamSidebarProps = PropsRuntime<'sidebar.workspaces'> & PropsLocale<
|
|
|
49
49
|
updateChannel: (request: AgentTeamUpdateChannelRequest) => Promise<RemoteResult<AgentTeamUpdateChannelResult>>;
|
|
50
50
|
updateMember: (request: AgentTeamUpdateMemberRequest) => Promise<RemoteResult<AgentTeamMemberResult>>;
|
|
51
51
|
recoverMember: (request: AgentTeamRecoverMemberRequest) => Promise<RemoteResult<AgentTeamRecoverMemberResult>>;
|
|
52
|
+
clearMemberContext: (request: AgentTeamClearMemberContextRequest) => Promise<RemoteResult<AgentTeamClearMemberContextResult>>;
|
|
52
53
|
joinChannel: (request: AgentTeamJoinChannelRequest) => Promise<RemoteResult<AgentTeamJoinChannelResult>>;
|
|
53
54
|
removeChannelMember: (request: AgentTeamRemoveChannelMemberRequest) => Promise<RemoteResult<AgentTeamRemoveChannelMemberResult>>;
|
|
54
55
|
/** Session-independent Host model catalog (`llm.models`); needs no live Member. */
|
|
@@ -72,6 +73,7 @@ export type TeamConversationProps = PropsRuntime<'conversation'> & PropsLocale<'
|
|
|
72
73
|
removeChannelMember: (request: AgentTeamRemoveChannelMemberRequest) => Promise<RemoteResult<AgentTeamRemoveChannelMemberResult>>;
|
|
73
74
|
reply: (request: AgentTeamReplyRequest) => Promise<RemoteResult<AgentTeamReplyResult | AgentTeamConfirmationRequired>>;
|
|
74
75
|
changeTask: (request: AgentTeamTaskRequest) => Promise<RemoteResult<AgentTeamTaskResult>>;
|
|
76
|
+
promoteThread: (request: AgentTeamPromoteThreadRequest) => Promise<RemoteResult<AgentTeamPromoteThreadResult>>;
|
|
75
77
|
resolveTaskRefs: (request: AgentTeamResolveTaskRefsRequest) => Promise<RemoteResult<AgentTeamResolveTaskRefsResult>>;
|
|
76
78
|
loadMembers: (request: AgentTeamMembersRequest) => Promise<RemoteResult<readonly AgentTeamClientMemberStatus[]>>;
|
|
77
79
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../../src/client/slots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,KAAK,EACV,yBAAyB,EACzB,mBAAmB,EACnB,2BAA2B,EAC3B,6BAA6B,EAC7B,4BAA4B,EAC5B,2BAA2B,EAC3B,0BAA0B,EAC1B,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,EAC7B,4BAA4B,EAC5B,qBAAqB,EACrB,6BAA6B,EAC7B,4BAA4B,EAC5B,uBAAuB,EACvB,mCAAmC,EACnC,kCAAkC,EAClC,qBAAqB,EACrB,+BAA+B,EAC/B,8BAA8B,EAC9B,oBAAoB,EACpB,6BAA6B,EAC7B,sBAAsB,EACtB,6BAA6B,EA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C,mBAAmB,CAAC,CAAC,CAAA;IACzF,aAAa,EAAE,CAAC,OAAO,EAAE,6BAA6B,KAAK,OAAO,CAAC,YAAY,CAAC,4BAA4B,CAAC,CAAC,CAAA;IAC9G,eAAe,EAAE,CAAC,OAAO,EAAE,+BAA+B,KAAK,OAAO,CAAC,YAAY,CAAC,8BAA8B,CAAC,CAAC,CAAA;IACpH,WAAW,EAAE,CAAC,OAAO,EAAE,uBAAuB,KAAK,OAAO,CAAC,YAAY,CAAC,SAAS,2BAA2B,EAAE,CAAC,CAAC,CAAA;CACjH,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,kBAAkB,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG;IACvF,gBAAgB,EAAE,MAAM,OAAO,CAAC,SAAS,eAAe,EAAE,CAAC,CAAA;CAC5D,CAAA;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,OAAO,EAAE,SAAS,2BAA2B,EAAE,CAAA;CACzD;AAED,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,uBAAuB,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,qBAAqB,GAAG;IAClH,UAAU,EAAE,oBAAoB,CAAA;IAChC,gBAAgB,EAAE,MAAM,OAAO,CAAC,SAAS,eAAe,EAAE,CAAC,CAAA;CAC5D,CAAA"}
|
|
@@ -15,7 +15,7 @@ export declare const rememberResolvedTaskRef: (entry: ResolvedTaskRef) => void;
|
|
|
15
15
|
/** Click-path Host lookup: remember every resolved entry and hand them back for immediate navigation. */
|
|
16
16
|
export declare const hostTaskRefLookup: (resolveTaskRefs: (request: AgentTeamResolveTaskRefsRequest) => Promise<RemoteResult<AgentTeamResolveTaskRefsResult>>, workspaceId: AgentTeamResolveTaskRefsRequest["workspaceId"]) => ((taskRefs: readonly AgentTeamTaskRef[]) => Promise<readonly ResolvedTaskRef[]>);
|
|
17
17
|
/** Resolve one Task ref through the Host and jump to its home Channel Thread. */
|
|
18
|
-
export declare const jumpToTaskThread: (resolveTaskRefs: (request: AgentTeamResolveTaskRefsRequest) => Promise<RemoteResult<AgentTeamResolveTaskRefsResult>>, workspaceId: AgentTeamResolveTaskRefsRequest["workspaceId"], taskRef: AgentTeamTaskRef, selectThread: (
|
|
18
|
+
export declare const jumpToTaskThread: (resolveTaskRefs: (request: AgentTeamResolveTaskRefsRequest) => Promise<RemoteResult<AgentTeamResolveTaskRefsResult>>, workspaceId: AgentTeamResolveTaskRefsRequest["workspaceId"], taskRef: AgentTeamTaskRef, selectThread: (threadRef: AgentTeamThreadRef, channelRef?: AgentTeamChannelRef, taskRef?: AgentTeamTaskRef, taskNumber?: number) => void) => void;
|
|
19
19
|
/**
|
|
20
20
|
* Batch-resolve unknown refs through the Host lookup. Concurrent callers
|
|
21
21
|
* deduplicate through the pending set; failures just clear the pending mark
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-refs.d.ts","sourceRoot":"","sources":["../../../src/client/task-refs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EACV,mBAAmB,EAAE,+BAA+B,EAAE,8BAA8B,EAAE,gBAAgB,EAAE,kBAAkB,EAC3H,MAAM,gCAAgC,CAAA;AAEvC,4EAA4E;AAC5E,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAA;IAClC,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAA;IACxC,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAA;IACtC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAwBD,0EAA0E;AAC1E,eAAO,MAAM,yBAAyB,QAAO,MAAmE,CAAA;AAEhH,eAAO,MAAM,qBAAqB,GAAI,SAAS,gBAAgB,K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EtH,sEAAsE;AACtE,eAAO,MAAM,uBAAuB,GAAI,OAAO,eAAe,KAAG,IAIhE,CAAA;AAED,yGAAyG;AACzG,eAAO,MAAM,iBAAiB,GAC5B,iBAAiB,CAAC,OAAO,EAAE,+BAA+B,KAAK,OAAO,CAAC,YAAY,CAAC,8BAA8B,CAAC,CAAC,EACpH,aAAa,+BAA+B,CAAC,aAAa,CAAC,KAC1D,CAAC,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,KAAK,OAAO,CAAC,SAAS,eAAe,EAAE,CAAC,CAM/E,CAAA;AAEH,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,GAC3B,iBAAiB,CAAC,OAAO,EAAE,+BAA+B,KAAK,OAAO,CAAC,YAAY,CAAC,8BAA8B,CAAC,CAAC,EACpH,aAAa,+BAA+B,CAAC,aAAa,CAAC,EAC3D,SAAS,gBAAgB,EACzB,cAAc,CAAC,SAAS,EAAE,kBAAkB,EAAE,UAAU,CAAC,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,gBAAgB,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI,KACvI,IAMF,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,MAAM,SAAS,gBAAgB,EAAE,EACjC,QAAQ,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,KAAK,OAAO,CAAC,SAAS,eAAe,EAAE,CAAC,KACrF,OAAO,CAAC,IAAI,CAmBd,CAAA"}
|
|
@@ -41,7 +41,7 @@ export const jumpToTaskThread = (resolveTaskRefs, workspaceId, taskRef, selectTh
|
|
|
41
41
|
return;
|
|
42
42
|
const hit = result.value.resolved[0];
|
|
43
43
|
if (hit !== undefined)
|
|
44
|
-
selectThread(hit.
|
|
44
|
+
selectThread(hit.threadRef, hit.channelRef, hit.taskRef, hit.taskNumber);
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
47
|
/**
|
|
@@ -73,6 +73,15 @@ export declare function formatActivity(activity: AgentTeamActivity, options: {
|
|
|
73
73
|
}): string;
|
|
74
74
|
/** Remove the machine-facing `[attachment] <path>` prompt lines from a body before display. */
|
|
75
75
|
export declare function stripAttachmentLines(body: string): string;
|
|
76
|
+
/**
|
|
77
|
+
* Displayed bodies past this character count render clamped behind an expand
|
|
78
|
+
* control. The rule is deterministic from the body alone, so every surface
|
|
79
|
+
* derives the same default for the same Message and no client has to remember
|
|
80
|
+
* a fold state.
|
|
81
|
+
*/
|
|
82
|
+
export declare const MESSAGE_COLLAPSE_CHARS = 600;
|
|
83
|
+
/** Whether one displayed Message body starts clamped behind the expand control. */
|
|
84
|
+
export declare function shouldClampMessage(displayBody: string): boolean;
|
|
76
85
|
/** How one Message body renders: mention-chip segments, literal text, or Markdown. */
|
|
77
86
|
export type MessageBodyRender = 'inline' | 'literal' | 'markdown';
|
|
78
87
|
/** Rendering decision for one Message body, resolved once from its stored form. */
|