refactor(agent): scope queue actions to edit and remove
This commit is contained in:
@@ -105,7 +105,6 @@ export interface QueuedMessage {
|
||||
readonly id: InboxItemId
|
||||
readonly preview: string
|
||||
readonly text: string | null
|
||||
readonly placement: 'queued' | 'steering'
|
||||
}
|
||||
|
||||
/** Guard union of the scoped consume-token event, checked by the machine. */
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// The 'conversation.input.dock' SlotMap declaration lives in
|
||||
// ../contract/slots.ts beside the other input-region slots.
|
||||
import type { Context } from 'cordis'
|
||||
import { useEffect, useMemo, useState } from 'react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'
|
||||
import type { SessionId } from '@deepseek-ai/dsh-client-runtime/client'
|
||||
import type { InboxItemId, QueueAction } from '@deepseek-ai/dsh-client-connection/client'
|
||||
@@ -24,10 +24,7 @@ export type QueueDockProps = PropsRuntime<'conversation.input.dock'> & QueueDock
|
||||
|
||||
/** Queue strip: one preview line per queued message; renders null when the queue is empty. */
|
||||
export function QueueDock({ useSession, updateQueue, notify }: QueueDockProps) {
|
||||
const inbox = useSession(s => s.queue)
|
||||
// TODO(web-steer-ui): Give pending steering its own interaction before
|
||||
// exposing it; QueueDock owns only independent queued turns.
|
||||
const queue = useMemo(() => inbox.filter(row => row.placement === 'queued'), [inbox])
|
||||
const queue = useSession(s => s.queue)
|
||||
const [editing, setEditing] = useState<{ id: InboxItemId; text: string } | null>(null)
|
||||
const [busy, setBusy] = useState<InboxItemId | null>(null)
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ export interface IConversation {
|
||||
/**
|
||||
* Apply one operation to a pending queue occurrence.
|
||||
* @param itemId - agent-owned inbox occurrence identity.
|
||||
* @param action - edit, remove, or promote operation.
|
||||
* @param action - edit or remove operation.
|
||||
* @returns completion; business failures reject.
|
||||
*/
|
||||
updateQueue(itemId: InboxItemId, action: QueueAction): Promise<void>
|
||||
|
||||
Reference in New Issue
Block a user