@stack-spot/ai-chat-widget 1.36.3-beta.1 → 1.36.4
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/CHANGELOG.md +39 -35
- package/dist/StackspotAIWidget.d.ts.map +1 -1
- package/dist/StackspotAIWidget.js +2 -1
- package/dist/StackspotAIWidget.js.map +1 -1
- package/dist/app-metadata.json +4 -4
- package/dist/components/FileDescription.d.ts +0 -1
- package/dist/components/FileDescription.d.ts.map +1 -1
- package/dist/components/FileDescription.js.map +1 -1
- package/dist/components/HistoryList.d.ts.map +1 -1
- package/dist/components/HistoryList.js +2 -0
- package/dist/components/HistoryList.js.map +1 -1
- package/dist/hooks/midnight-update-view.d.ts +5 -0
- package/dist/hooks/midnight-update-view.d.ts.map +1 -0
- package/dist/hooks/midnight-update-view.js +30 -0
- package/dist/hooks/midnight-update-view.js.map +1 -0
- package/dist/state/WidgetState.d.ts +1 -1
- package/dist/state/WidgetState.d.ts.map +1 -1
- package/dist/state/constants.d.ts.map +1 -1
- package/dist/state/constants.js +1 -0
- package/dist/state/constants.js.map +1 -1
- package/dist/utils/tools.d.ts +2 -1
- package/dist/utils/tools.d.ts.map +1 -1
- package/dist/utils/tools.js +12 -1
- package/dist/utils/tools.js.map +1 -1
- package/dist/views/Agents/AgentDescription.d.ts.map +1 -1
- package/dist/views/Agents/AgentDescription.js +26 -14
- package/dist/views/Agents/AgentDescription.js.map +1 -1
- package/dist/views/Agents/dictionary.d.ts +1 -1
- package/dist/views/Agents/dictionary.d.ts.map +1 -1
- package/dist/views/Agents/dictionary.js +2 -0
- package/dist/views/Agents/dictionary.js.map +1 -1
- package/dist/views/Agents/styled.d.ts.map +1 -1
- package/dist/views/Agents/styled.js +14 -3
- package/dist/views/Agents/styled.js.map +1 -1
- package/dist/views/Agents/useAgentFavorites.js +3 -3
- package/dist/views/Agents/useAgentFavorites.js.map +1 -1
- package/dist/views/Chat/ChatMessage.d.ts.map +1 -1
- package/dist/views/Chat/ChatMessage.js +17 -9
- package/dist/views/Chat/ChatMessage.js.map +1 -1
- package/dist/views/Chat/styled.d.ts.map +1 -1
- package/dist/views/Chat/styled.js +24 -0
- package/dist/views/Chat/styled.js.map +1 -1
- package/dist/views/MessageInput/SelectContent.d.ts.map +1 -1
- package/dist/views/MessageInput/SelectContent.js +1 -1
- package/dist/views/MessageInput/SelectContent.js.map +1 -1
- package/dist/views/MessageInput/UploadBar.d.ts.map +1 -1
- package/dist/views/MessageInput/UploadBar.js +2 -3
- package/dist/views/MessageInput/UploadBar.js.map +1 -1
- package/dist/views/MessageInput/dictionary.d.ts +1 -1
- package/dist/views/MessageInput/dictionary.d.ts.map +1 -1
- package/dist/views/MessageInput/dictionary.js +2 -4
- package/dist/views/MessageInput/dictionary.js.map +1 -1
- package/dist/views/MessageInput/styled.js +8 -8
- package/dist/views/Resources.d.ts +2 -0
- package/dist/views/Resources.d.ts.map +1 -0
- package/dist/views/Resources.js +56 -0
- package/dist/views/Resources.js.map +1 -0
- package/dist/views/Steps/dictionary.d.ts +1 -1
- package/dist/views/Tools.js +4 -2
- package/dist/views/Tools.js.map +1 -1
- package/package.json +3 -3
- package/src/StackspotAIWidget.tsx +2 -0
- package/src/app-metadata.json +4 -4
- package/src/components/FileDescription.tsx +0 -1
- package/src/components/HistoryList.tsx +3 -0
- package/src/hooks/midnight-update-view.ts +36 -0
- package/src/state/WidgetState.ts +1 -1
- package/src/state/constants.ts +2 -1
- package/src/utils/tools.ts +23 -2
- package/src/views/Agents/AgentDescription.tsx +64 -23
- package/src/views/Agents/dictionary.ts +2 -0
- package/src/views/Agents/styled.ts +14 -3
- package/src/views/Agents/useAgentFavorites.ts +3 -3
- package/src/views/Chat/ChatMessage.tsx +33 -19
- package/src/views/Chat/styled.ts +24 -0
- package/src/views/MessageInput/SelectContent.tsx +3 -4
- package/src/views/MessageInput/UploadBar.tsx +2 -5
- package/src/views/MessageInput/dictionary.ts +2 -4
- package/src/views/MessageInput/styled.ts +8 -8
- package/src/views/Resources.tsx +99 -0
- package/src/views/Tools.tsx +19 -13
package/src/views/Tools.tsx
CHANGED
|
@@ -42,20 +42,26 @@ const ToolsPanel = () => {
|
|
|
42
42
|
}, [messageId])
|
|
43
43
|
|
|
44
44
|
const [toolKits] = agentToolsClient.tools.useStatefulQuery({}, { enabled: !!message?.agent?.id })
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
const [agent] = agentToolsClient.agent.useStatefulQuery({ agentId: message?.agent?.id || '' },
|
|
46
|
+
{ enabled: !!message?.agent?.id })
|
|
47
|
+
const tools = useMemo(() => message?.tools?.map(id => toolById(id, toolKits)), [messageId, toolKits])
|
|
48
|
+
const customTools = useMemo(() => message?.tools?.map(id => toolById(id, agent?.toolkits?.custom_toolkits)),
|
|
49
|
+
[messageId, agent?.toolkits?.custom_toolkits])
|
|
50
|
+
return !!(tools?.length || customTools?.length) && (
|
|
48
51
|
<ToolList>
|
|
49
|
-
{tools
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
{[...(tools || []), ...(customTools || [])].map(
|
|
53
|
+
(tool) =>
|
|
54
|
+
tool && (
|
|
55
|
+
<li key={tool.id}>
|
|
56
|
+
<ToolBadge
|
|
57
|
+
name={tool.name || tool.id}
|
|
58
|
+
image={tool.image ?? ''}
|
|
59
|
+
description={tool.description ?? ''}
|
|
60
|
+
backgroundColor="light.500"
|
|
61
|
+
/>
|
|
62
|
+
</li>
|
|
63
|
+
),
|
|
64
|
+
)}
|
|
59
65
|
</ToolList>
|
|
60
66
|
)
|
|
61
67
|
}
|