@tanstack/ai-devtools-core 0.3.38 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Shell/DKCFIT6H.js +12142 -0
- package/dist/Shell/SLOX2TPU.js +12119 -0
- package/dist/Shell/Z6HLJOVZ.js +10170 -0
- package/dist/dev.js +1 -1
- package/dist/index.js +1 -1
- package/dist/production/Shell/DKCFIT6H.js +12142 -0
- package/dist/production/Shell/SLOX2TPU.js +12119 -0
- package/dist/production/Shell/Z6HLJOVZ.js +10170 -0
- package/dist/production/dev.js +1 -1
- package/dist/production/index.js +1 -1
- package/dist/production/server.js +1 -1
- package/dist/server.js +1 -1
- package/package.json +4 -4
- package/src/components/Shell.tsx +74 -30
- package/src/components/conversation/IterationCard.tsx +261 -12
- package/src/components/conversation/IterationTimeline.tsx +66 -16
- package/src/components/conversation/index.ts +0 -9
- package/src/components/hooks/FixtureNamePopover.tsx +69 -0
- package/src/components/hooks/GenerationPanel.tsx +847 -0
- package/src/components/hooks/HookDashboard.tsx +292 -0
- package/src/components/hooks/HookDetails.tsx +1757 -0
- package/src/components/hooks/ToolFixtureForm.tsx +347 -0
- package/src/components/hooks/hook-dashboard-model.ts +134 -0
- package/src/components/hooks/index.ts +4 -0
- package/src/components/hooks/preview-messages.ts +117 -0
- package/src/components/hooks/preview-model.ts +195 -0
- package/src/components/utils/format.ts +0 -58
- package/src/env.d.ts +5 -0
- package/src/store/ai-context.tsx +1165 -159
- package/src/store/ai-store.ts +0 -1
- package/src/store/hook-registry.ts +815 -0
- package/src/store/message-event-utils.ts +60 -0
- package/src/styles/use-styles.ts +1558 -99
- package/dist/Shell/MRWZEHAJ.js +0 -6225
- package/dist/Shell/RRRNZJ5E.js +0 -7560
- package/dist/production/Shell/MRWZEHAJ.js +0 -6225
- package/dist/production/Shell/RRRNZJ5E.js +0 -7560
- package/src/components/ConversationDetails.tsx +0 -216
- package/src/components/ConversationsList.tsx +0 -21
- package/src/components/conversation/ActivityEventsTab.tsx +0 -57
- package/src/components/conversation/ChunkBadges.tsx +0 -51
- package/src/components/conversation/ChunkItem.tsx +0 -273
- package/src/components/conversation/ChunksCollapsible.tsx +0 -56
- package/src/components/conversation/ChunksTab.tsx +0 -87
- package/src/components/conversation/ConversationHeader.tsx +0 -106
- package/src/components/conversation/ConversationTabs.tsx +0 -205
- package/src/components/conversation/MessageCard.tsx +0 -174
- package/src/components/conversation/MessageGroup.tsx +0 -101
- package/src/components/conversation/MessagesTab.tsx +0 -30
- package/src/components/conversation/SummariesTab.tsx +0 -91
- package/src/components/conversation/ToolCallDisplay.tsx +0 -99
- package/src/components/list/ConversationRow.tsx +0 -85
- package/src/components/list/index.ts +0 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export interface ClientAssistantPlaceholderInput {
|
|
2
|
+
role: string
|
|
3
|
+
source: 'client' | 'server'
|
|
4
|
+
content?: string
|
|
5
|
+
toolCalls?: Array<unknown>
|
|
6
|
+
parts?: Array<unknown>
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface ClientToolCallMessageInput {
|
|
10
|
+
messageId: string
|
|
11
|
+
toolCallId: string
|
|
12
|
+
toolName: string
|
|
13
|
+
arguments: string
|
|
14
|
+
state: string
|
|
15
|
+
timestamp: number
|
|
16
|
+
source: 'client' | 'server'
|
|
17
|
+
requestId?: string
|
|
18
|
+
approvalRequired?: boolean
|
|
19
|
+
approvalId?: string
|
|
20
|
+
approvalApproved?: boolean
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function createClientToolCallMessage(input: ClientToolCallMessageInput) {
|
|
24
|
+
return {
|
|
25
|
+
id: input.messageId,
|
|
26
|
+
role: 'assistant' as const,
|
|
27
|
+
content: '',
|
|
28
|
+
timestamp: input.timestamp,
|
|
29
|
+
parts: [],
|
|
30
|
+
toolCalls: [
|
|
31
|
+
{
|
|
32
|
+
id: input.toolCallId,
|
|
33
|
+
name: input.toolName,
|
|
34
|
+
arguments: input.arguments,
|
|
35
|
+
state: input.state,
|
|
36
|
+
...(input.approvalRequired !== undefined
|
|
37
|
+
? { approvalRequired: input.approvalRequired }
|
|
38
|
+
: {}),
|
|
39
|
+
...(input.approvalId ? { approvalId: input.approvalId } : {}),
|
|
40
|
+
...(input.approvalApproved !== undefined
|
|
41
|
+
? { approvalApproved: input.approvalApproved }
|
|
42
|
+
: {}),
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
source: input.source,
|
|
46
|
+
...(input.requestId ? { requestId: input.requestId } : {}),
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function shouldSkipClientAssistantPlaceholder(
|
|
51
|
+
message: ClientAssistantPlaceholderInput,
|
|
52
|
+
): boolean {
|
|
53
|
+
return (
|
|
54
|
+
message.role === 'assistant' &&
|
|
55
|
+
message.source === 'client' &&
|
|
56
|
+
!message.content &&
|
|
57
|
+
(!message.toolCalls || message.toolCalls.length === 0) &&
|
|
58
|
+
(!message.parts || message.parts.length === 0)
|
|
59
|
+
)
|
|
60
|
+
}
|