Skip to content

Commit e4f7821

Browse files
committed
improvement(copilot): queue
1 parent c0d79b1 commit e4f7821

File tree

7 files changed

+18
-159
lines changed

7 files changed

+18
-159
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export { useCheckpointManagement } from './use-checkpoint-management'
2-
export { useMessageContentAnalysis } from './use-message-content-analysis'
32
export { useMessageEditing } from './use-message-editing'

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/hooks/use-message-content-analysis.ts

Lines changed: 0 additions & 31 deletions
This file was deleted.

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/queued-messages/queued-messages.tsx

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,22 @@ export function QueuedMessages() {
3131
if (messageQueue.length === 0) return null
3232

3333
return (
34-
<div className='mx-2 overflow-hidden rounded-t-lg border border-black/[0.08] border-b-0 bg-[var(--bg-secondary)] dark:border-white/[0.08]'>
34+
<div className='mx-[14px] overflow-hidden rounded-t-[4px] border border-[var(--border)] border-b-0 bg-[var(--bg-secondary)]'>
3535
{/* Header */}
3636
<button
3737
type='button'
3838
onClick={() => setIsExpanded(!isExpanded)}
39-
className='flex w-full items-center justify-between px-2.5 py-1.5 transition-colors hover:bg-[var(--bg-tertiary)]'
39+
className='flex w-full items-center justify-between px-[10px] py-[6px] transition-colors hover:bg-[var(--surface-3)]'
4040
>
41-
<div className='flex items-center gap-1.5'>
41+
<div className='flex items-center gap-[6px]'>
4242
{isExpanded ? (
43-
<ChevronDown className='h-3 w-3 text-[var(--text-tertiary)]' />
43+
<ChevronDown className='h-[14px] w-[14px] text-[var(--text-tertiary)]' />
4444
) : (
45-
<ChevronRight className='h-3 w-3 text-[var(--text-tertiary)]' />
45+
<ChevronRight className='h-[14px] w-[14px] text-[var(--text-tertiary)]' />
4646
)}
47-
<span className='font-medium text-[var(--text-secondary)] text-xs'>
48-
{messageQueue.length} Queued
47+
<span className='font-medium text-[12px] text-[var(--text-primary)]'>Queued</span>
48+
<span className='flex-shrink-0 font-medium text-[12px] text-[var(--text-tertiary)]'>
49+
{messageQueue.length}
4950
</span>
5051
</div>
5152
</button>
@@ -56,41 +57,41 @@ export function QueuedMessages() {
5657
{messageQueue.map((msg) => (
5758
<div
5859
key={msg.id}
59-
className='group flex items-center gap-2 border-black/[0.04] border-t px-2.5 py-1.5 hover:bg-[var(--bg-tertiary)] dark:border-white/[0.04]'
60+
className='group flex items-center gap-[8px] border-[var(--border)] border-t px-[10px] py-[6px] hover:bg-[var(--surface-3)]'
6061
>
6162
{/* Radio indicator */}
62-
<div className='flex h-3 w-3 shrink-0 items-center justify-center'>
63-
<div className='h-2.5 w-2.5 rounded-full border border-[var(--text-tertiary)]/50' />
63+
<div className='flex h-[14px] w-[14px] shrink-0 items-center justify-center'>
64+
<div className='h-[10px] w-[10px] rounded-full border border-[var(--text-tertiary)]/50' />
6465
</div>
6566

6667
{/* Message content */}
6768
<div className='min-w-0 flex-1'>
68-
<p className='truncate text-[var(--text-primary)] text-xs'>{msg.content}</p>
69+
<p className='truncate text-[13px] text-[var(--text-primary)]'>{msg.content}</p>
6970
</div>
7071

7172
{/* Actions - always visible */}
72-
<div className='flex shrink-0 items-center gap-0.5'>
73+
<div className='flex shrink-0 items-center gap-[4px]'>
7374
<button
7475
type='button'
7576
onClick={(e) => {
7677
e.stopPropagation()
7778
handleSendNow(msg.id)
7879
}}
79-
className='rounded p-0.5 text-[var(--text-tertiary)] transition-colors hover:bg-[var(--bg-quaternary)] hover:text-[var(--text-primary)]'
80+
className='rounded p-[3px] text-[var(--text-tertiary)] transition-colors hover:bg-[var(--bg-quaternary)] hover:text-[var(--text-primary)]'
8081
title='Send now (aborts current stream)'
8182
>
82-
<ArrowUp className='h-3 w-3' />
83+
<ArrowUp className='h-[14px] w-[14px]' />
8384
</button>
8485
<button
8586
type='button'
8687
onClick={(e) => {
8788
e.stopPropagation()
8889
handleRemove(msg.id)
8990
}}
90-
className='rounded p-0.5 text-[var(--text-tertiary)] transition-colors hover:bg-red-500/10 hover:text-red-400'
91+
className='rounded p-[3px] text-[var(--text-tertiary)] transition-colors hover:bg-red-500/10 hover:text-red-400'
9192
title='Remove from queue'
9293
>
93-
<Trash2 className='h-3 w-3' />
94+
<Trash2 className='h-[14px] w-[14px]' />
9495
</button>
9596
</div>
9697
</div>

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/user-input/hooks/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@ export { useMentionData } from './use-mention-data'
55
export { useMentionInsertHandlers } from './use-mention-insert-handlers'
66
export { useMentionKeyboard } from './use-mention-keyboard'
77
export { useMentionMenu } from './use-mention-menu'
8-
export { useMentionSystem } from './use-mention-system'
98
export { useMentionTokens } from './use-mention-tokens'
109
export { useTextareaAutoResize } from './use-textarea-auto-resize'

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/user-input/hooks/use-mention-system.ts

Lines changed: 0 additions & 107 deletions
This file was deleted.

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/copilot.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ export const Copilot = forwardRef<CopilotRef, CopilotProps>(({ panelWidth }, ref
150150
isSendingMessage,
151151
showPlanTodos,
152152
planTodos,
153-
setPlanTodos,
154153
})
155154

156155
/** Gets markdown content for design document section (available in all modes once created) */

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/hooks/use-todo-management.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ interface UseTodoManagementProps {
66
isSendingMessage: boolean
77
showPlanTodos: boolean
88
planTodos: Array<{ id: string; content: string; completed?: boolean }>
9-
setPlanTodos: (todos: any[]) => void
109
}
1110

1211
/**
@@ -16,7 +15,7 @@ interface UseTodoManagementProps {
1615
* @returns Todo management utilities
1716
*/
1817
export function useTodoManagement(props: UseTodoManagementProps) {
19-
const { isSendingMessage, showPlanTodos, planTodos, setPlanTodos } = props
18+
const { isSendingMessage, showPlanTodos, planTodos } = props
2019

2120
const [todosCollapsed, setTodosCollapsed] = useState(false)
2221
const wasSendingRef = useRef(false)

0 commit comments

Comments
 (0)