diff --git a/01_content/src/client/index.tsx b/01_content/src/client/index.tsx index 7ade564..3a41013 100644 --- a/01_content/src/client/index.tsx +++ b/01_content/src/client/index.tsx @@ -710,9 +710,11 @@ function WorktableSection(props: any) { const [wsFolderError, setWsFolderError] = useState(false) /** 图标选择器:kind + 目标 id + 弹窗锚点坐标(fixed 定位) */ const [iconPick, setIconPick] = useState<{ kind: 'layout' | 'shortcut' | 'project'; id: string; x: number; y: number } | null>(null) - /** 对话绑定弹窗:项目 id + 锚点坐标;bindGroups = 打开时抓取的会话分组 */ + /** 对话绑定弹窗:项目 id + 锚点坐标;bindGroups = 打开时抓取的会话分组; + * bindListOpen = 右侧对话列表弹层(点「绑定对话」行弹出) */ const [bindPick, setBindPick] = useState<{ id: string; x: number; y: number } | null>(null) const [bindGroups, setBindGroups] = useState<{ title: string; sessions: { id: string; title: string; isCurrent: boolean }[] }[]>([]) + const [bindListOpen, setBindListOpen] = useState(false) /** 自定义布局弹窗(预设网格末尾的 + 磁贴):描述 → 复制提示词到剪贴板 */ const [customOpen, setCustomOpen] = useState(false) @@ -1037,6 +1039,7 @@ function buildCustomLayoutPrompt(req: string): string { const x = clamp(Math.round(r.right + 8), 8, window.innerWidth - 300) const y = clamp(Math.round(r.top), 8, window.innerHeight - 420) setBindPick({ id, x, y }) + setBindListOpen(false) setBindGroups([]) fetchSessionGroups().then((res) => setBindGroups(res.groups)).catch(() => setBindGroups([])) }, []) @@ -1060,7 +1063,7 @@ function buildCustomLayoutPrompt(req: string): string { }) } - /** 绑定 / 解绑会话 */ + /** 绑定 / 解绑会话(弹窗保持打开,绑定结果即时显示在「绑定对话」框里) */ const setProjectBinding = (id: string, sessionId: string | null) => { persistProjects((prev) => { const next = { ...prev.bindings } @@ -1068,7 +1071,7 @@ function buildCustomLayoutPrompt(req: string): string { else delete next[id] return { ...prev, bindings: next } }) - setBindPick(null) + setBindListOpen(false) } /** 复制自定义布局提示词到剪贴板(失败则全选输入框手动复制) */ @@ -1957,11 +1960,11 @@ function buildCustomLayoutPrompt(req: string): string { )} - {bindPick &&
{t('bind.hint')}
- {projects.bindings[bindPick.id] && ( - - )} + })()} +{t('bind.hint')}
+ {projects.bindings[bindPick.id] && ( + + )} +