diff --git a/src/api.ts b/src/api.ts index 064d5df..30af7b7 100644 --- a/src/api.ts +++ b/src/api.ts @@ -27,6 +27,7 @@ export const api = { // 跨项目任务列表(方案 A 侧栏):默认仅未归档;includeArchived 含归档。 listTasks: (includeArchived?: boolean) => auth.fetch(`${BASE}/api/conversations${includeArchived ? '?archived=1' : ''}`).then(r => json(r)), setConversationFlags: (id: string, flags: { pinned?: boolean; archived?: boolean; allowCrossRead?: boolean; crossPrivate?: boolean }) => auth.fetch(`${BASE}/api/conversations/${id}`, { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(flags) }).then(r => { if (!r.ok) throw new Error(`${r.status}: ${r.statusText}`) }), + setPermissionMode: (id: string, permissionMode: string) => auth.fetch(`${BASE}/api/conversations/${id}`, { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ permissionMode }) }).then(r => { if (!r.ok) throw new Error(`${r.status}: ${r.statusText}`) }), me: () => auth.fetch(`${BASE}/api/me`).then(r => json<{ owner: string; name: string; auth: boolean; isAdmin?: boolean; mustChangePassword?: boolean }>(r)), // ---- 认证与会话(管理员发放制,R2)---- login: (owner: string, password: string) => auth.fetch(`${BASE}/api/auth/login`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ owner, password }) }).then(async r => { diff --git a/src/components/Conversation.tsx b/src/components/Conversation.tsx index 0b2a214..3103106 100644 --- a/src/components/Conversation.tsx +++ b/src/components/Conversation.tsx @@ -315,8 +315,9 @@ function HITLCardView({ card }: { card: HITLCard }) { setSubmitting(false) } return ( -
+
{card.question}
+ {card.detail &&
{card.detail}
} {card.choices && (
{card.choices.map(c => ( @@ -579,6 +580,19 @@ export function Conversation() { )} {text.startsWith('/') && setText(c)} />}
+