fix(web): keep composer add action attachment-only
This commit is contained in:
@@ -73,7 +73,6 @@ export interface EmptyHeroProps {
|
||||
status?: string
|
||||
onDraftChange: (text: string) => void
|
||||
onSend: (mode: 'queue' | 'steer') => void
|
||||
onAdd?: () => void
|
||||
/** Overlay content after the stack (EmptyState's modals). */
|
||||
children?: ReactNode
|
||||
}
|
||||
@@ -92,7 +91,6 @@ export function EmptyHero({
|
||||
status,
|
||||
onDraftChange,
|
||||
onSend,
|
||||
onAdd,
|
||||
children,
|
||||
}: EmptyHeroProps) {
|
||||
// Stable filter id so multiple hero mounts do not collide in the DOM.
|
||||
@@ -140,8 +138,6 @@ export function EmptyHero({
|
||||
placeholder={placeholder ?? 'Describe what you want to build'}
|
||||
onDraftChange={onDraftChange}
|
||||
onSend={onSend}
|
||||
{...(onAdd === undefined ? {} : { onAdd })}
|
||||
addLabel="Create workspace"
|
||||
/* v8 ignore next -- structural noop: hero never passes running=true, so stop is unreachable. */
|
||||
onStop={() => {}}
|
||||
/>
|
||||
|
||||
@@ -72,7 +72,6 @@ export function EmptyState({
|
||||
error={error}
|
||||
onDraftChange={updateSessionPrompt}
|
||||
onSend={() => { sendSession() }}
|
||||
onAdd={() => { setPickerOpen(true) }}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -72,6 +72,8 @@ describe('EmptyState', () => {
|
||||
prompt: 'draft', phase: 'ready',
|
||||
})
|
||||
expect(b.view.getByRole('button', { name: 'Choose workspace' }).textContent).toContain('workspace')
|
||||
fireEvent.click(b.view.getByRole('button', { name: 'Add attachment' }))
|
||||
expect((b.pickerOwner() as { open: boolean }).open).toBe(false)
|
||||
fireEvent.change(b.view.getByPlaceholderText('Describe what you want to build'), { target: { value: 'build it' } })
|
||||
expect(b.updateSessionPrompt).toHaveBeenCalledWith('build it')
|
||||
fireEvent.click(b.view.getByRole('button', { name: 'Send message' }))
|
||||
|
||||
Reference in New Issue
Block a user