@stack-spot/ai-chat-widget 1.13.2-beta.0 → 1.13.2
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 +35 -0
- package/dist/StackspotAIWidget.d.ts.map +1 -1
- package/dist/StackspotAIWidget.js +5 -2
- package/dist/StackspotAIWidget.js.map +1 -1
- package/dist/app-metadata.json +3 -3
- package/dist/chat-interceptors/send-message.d.ts.map +1 -1
- package/dist/chat-interceptors/send-message.js +2 -0
- package/dist/chat-interceptors/send-message.js.map +1 -1
- package/dist/components/Markdown.d.ts.map +1 -1
- package/dist/components/Markdown.js +1 -1
- package/dist/components/Markdown.js.map +1 -1
- package/dist/components/StackedBadge.d.ts +14 -0
- package/dist/components/StackedBadge.d.ts.map +1 -0
- package/dist/components/StackedBadge.js +56 -0
- package/dist/components/StackedBadge.js.map +1 -0
- package/dist/components/ToolBadge.d.ts +14 -0
- package/dist/components/ToolBadge.d.ts.map +1 -0
- package/dist/components/ToolBadge.js +108 -0
- package/dist/components/ToolBadge.js.map +1 -0
- package/dist/state/ChatEntry.d.ts +9 -16
- package/dist/state/ChatEntry.d.ts.map +1 -1
- package/dist/state/ChatEntry.js.map +1 -1
- package/dist/state/ChatState.d.ts +0 -1
- package/dist/state/ChatState.d.ts.map +1 -1
- package/dist/state/WidgetState.d.ts +3 -4
- package/dist/state/WidgetState.d.ts.map +1 -1
- package/dist/state/WidgetState.js +1 -12
- package/dist/state/WidgetState.js.map +1 -1
- package/dist/utils/check-is-trial.d.ts +2 -0
- package/dist/utils/check-is-trial.d.ts.map +1 -0
- package/dist/utils/check-is-trial.js +6 -0
- package/dist/utils/check-is-trial.js.map +1 -0
- package/dist/utils/tools.d.ts +7 -0
- package/dist/utils/tools.d.ts.map +1 -0
- package/dist/utils/tools.js +9 -0
- package/dist/utils/tools.js.map +1 -0
- package/dist/views/Agents/AgentDescription.d.ts.map +1 -1
- package/dist/views/Agents/AgentDescription.js +11 -1
- package/dist/views/Agents/AgentDescription.js.map +1 -1
- package/dist/views/Agents/AgentsPanel.d.ts.map +1 -1
- package/dist/views/Agents/AgentsPanel.js +13 -6
- package/dist/views/Agents/AgentsPanel.js.map +1 -1
- package/dist/views/Agents/AgentsTab.d.ts.map +1 -1
- package/dist/views/Agents/AgentsTab.js +10 -8
- package/dist/views/Agents/AgentsTab.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.js +1 -1
- package/dist/views/Chat/AgentInfo.js +3 -3
- package/dist/views/Chat/AgentInfo.js.map +1 -1
- package/dist/views/Chat/ChatMessage.d.ts.map +1 -1
- package/dist/views/Chat/ChatMessage.js +19 -4
- package/dist/views/Chat/ChatMessage.js.map +1 -1
- package/dist/views/Chat/StepsList.d.ts +2 -2
- package/dist/views/Chat/StepsList.d.ts.map +1 -1
- package/dist/views/Chat/StepsList.js +2 -2
- package/dist/views/Chat/StepsList.js.map +1 -1
- package/dist/views/Chat/styled.d.ts.map +1 -1
- package/dist/views/Chat/styled.js +21 -12
- package/dist/views/Chat/styled.js.map +1 -1
- package/dist/views/ChatTabSelection.d.ts.map +1 -1
- package/dist/views/ChatTabSelection.js +16 -2
- package/dist/views/ChatTabSelection.js.map +1 -1
- package/dist/views/KnowledgeSources.d.ts.map +1 -1
- package/dist/views/KnowledgeSources.js +10 -5
- package/dist/views/KnowledgeSources.js.map +1 -1
- package/dist/views/MessageInput/AgentSelector.d.ts +2 -1
- package/dist/views/MessageInput/AgentSelector.d.ts.map +1 -1
- package/dist/views/MessageInput/AgentSelector.js +15 -8
- package/dist/views/MessageInput/AgentSelector.js.map +1 -1
- package/dist/views/MessageInput/QuickCommandSelector.d.ts +2 -1
- package/dist/views/MessageInput/QuickCommandSelector.d.ts.map +1 -1
- package/dist/views/MessageInput/QuickCommandSelector.js +2 -2
- package/dist/views/MessageInput/QuickCommandSelector.js.map +1 -1
- package/dist/views/MessageInput/index.d.ts.map +1 -1
- package/dist/views/MessageInput/index.js +4 -2
- package/dist/views/MessageInput/index.js.map +1 -1
- package/dist/views/Stacks.d.ts.map +1 -1
- package/dist/views/Stacks.js +10 -5
- package/dist/views/Stacks.js.map +1 -1
- package/dist/views/{Tools → Steps}/FlowChart/HandleGroup.d.ts.map +1 -1
- package/dist/views/{Tools → Steps}/FlowChart/HandleGroup.js.map +1 -1
- package/dist/views/{Tools → Steps}/FlowChart/NodeStep.d.ts.map +1 -1
- package/dist/views/Steps/FlowChart/NodeStep.js +13 -0
- package/dist/views/Steps/FlowChart/NodeStep.js.map +1 -0
- package/dist/views/Steps/FlowChart/index.d.ts +10 -0
- package/dist/views/Steps/FlowChart/index.d.ts.map +1 -0
- package/dist/views/{Tools → Steps}/FlowChart/index.js +1 -5
- package/dist/views/{Tools → Steps}/FlowChart/index.js.map +1 -1
- package/dist/views/{Tools → Steps}/FlowChart/layout.d.ts.map +1 -1
- package/dist/views/{Tools → Steps}/FlowChart/layout.js.map +1 -1
- package/dist/views/{Tools → Steps}/FlowChart/styled.d.ts.map +1 -1
- package/dist/views/{Tools → Steps}/FlowChart/styled.js +0 -49
- package/dist/views/{Tools → Steps}/FlowChart/styled.js.map +1 -1
- package/dist/views/{Tools → Steps}/FlowChart/types.d.ts +3 -3
- package/dist/views/Steps/FlowChart/types.d.ts.map +1 -0
- package/dist/views/Steps/FlowChart/types.js.map +1 -0
- package/dist/views/Steps/StepModal.d.ts +9 -0
- package/dist/views/Steps/StepModal.d.ts.map +1 -0
- package/dist/views/Steps/StepModal.js +124 -0
- package/dist/views/Steps/StepModal.js.map +1 -0
- package/dist/views/Steps/StepsPanel.d.ts +6 -0
- package/dist/views/Steps/StepsPanel.d.ts.map +1 -0
- package/dist/views/{Tools/ToolsPanel.js → Steps/StepsPanel.js} +3 -3
- package/dist/views/{Tools/ToolsPanel.js.map → Steps/StepsPanel.js.map} +1 -1
- package/dist/views/{Tools → Steps}/dictionary.d.ts +9 -11
- package/dist/views/Steps/dictionary.d.ts.map +1 -0
- package/dist/views/{Tools → Steps}/dictionary.js +9 -11
- package/dist/views/Steps/dictionary.js.map +1 -0
- package/dist/views/{Tools → Steps}/index.d.ts +1 -1
- package/dist/views/Steps/index.d.ts.map +1 -0
- package/dist/views/{Tools → Steps}/index.js +10 -10
- package/dist/views/{Tools → Steps}/index.js.map +1 -1
- package/dist/views/Steps/utils.d.ts +6 -0
- package/dist/views/Steps/utils.d.ts.map +1 -0
- package/dist/views/{Tools → Steps}/utils.js.map +1 -1
- package/dist/views/Tools.d.ts +2 -0
- package/dist/views/Tools.d.ts.map +1 -0
- package/dist/views/Tools.js +51 -0
- package/dist/views/Tools.js.map +1 -0
- package/package.json +2 -2
- package/src/StackspotAIWidget.tsx +8 -3
- package/src/app-metadata.json +3 -3
- package/src/chat-interceptors/send-message.ts +2 -0
- package/src/components/Markdown.tsx +1 -0
- package/src/components/StackedBadge.tsx +77 -0
- package/src/components/ToolBadge.tsx +146 -0
- package/src/state/ChatEntry.ts +9 -17
- package/src/state/ChatState.ts +1 -1
- package/src/state/WidgetState.ts +4 -16
- package/src/utils/check-is-trial.ts +6 -0
- package/src/utils/tools.ts +11 -0
- package/src/views/Agents/AgentDescription.tsx +14 -0
- package/src/views/Agents/AgentsPanel.tsx +11 -3
- package/src/views/Agents/AgentsTab.tsx +11 -10
- package/src/views/Agents/dictionary.ts +2 -0
- package/src/views/Agents/styled.ts +1 -1
- package/src/views/Chat/AgentInfo.tsx +4 -4
- package/src/views/Chat/ChatMessage.tsx +30 -4
- package/src/views/Chat/StepsList.tsx +6 -6
- package/src/views/Chat/styled.ts +21 -12
- package/src/views/ChatTabSelection.tsx +22 -4
- package/src/views/KnowledgeSources.tsx +9 -3
- package/src/views/MessageInput/AgentSelector.tsx +19 -8
- package/src/views/MessageInput/QuickCommandSelector.tsx +3 -2
- package/src/views/MessageInput/index.tsx +5 -4
- package/src/views/Stacks.tsx +10 -4
- package/src/views/{Tools → Steps}/FlowChart/NodeStep.tsx +11 -23
- package/src/views/{Tools → Steps}/FlowChart/index.tsx +3 -7
- package/src/views/{Tools → Steps}/FlowChart/styled.ts +0 -49
- package/src/views/{Tools → Steps}/FlowChart/types.ts +3 -3
- package/src/views/Steps/StepModal.tsx +216 -0
- package/src/views/{Tools/ToolsPanel.tsx → Steps/StepsPanel.tsx} +2 -2
- package/src/views/{Tools → Steps}/dictionary.ts +9 -11
- package/src/views/{Tools → Steps}/index.tsx +10 -10
- package/src/views/{Tools → Steps}/utils.tsx +4 -4
- package/src/views/Tools.tsx +71 -0
- package/dist/utils/agent.d.ts +0 -2
- package/dist/utils/agent.d.ts.map +0 -1
- package/dist/utils/agent.js +0 -2
- package/dist/utils/agent.js.map +0 -1
- package/dist/views/Tools/FlowChart/NodeStep.js +0 -15
- package/dist/views/Tools/FlowChart/NodeStep.js.map +0 -1
- package/dist/views/Tools/FlowChart/index.d.ts +0 -9
- package/dist/views/Tools/FlowChart/index.d.ts.map +0 -1
- package/dist/views/Tools/FlowChart/types.d.ts.map +0 -1
- package/dist/views/Tools/FlowChart/types.js.map +0 -1
- package/dist/views/Tools/StepModal.d.ts +0 -9
- package/dist/views/Tools/StepModal.d.ts.map +0 -1
- package/dist/views/Tools/StepModal.js +0 -156
- package/dist/views/Tools/StepModal.js.map +0 -1
- package/dist/views/Tools/ToolsPanel.d.ts +0 -6
- package/dist/views/Tools/ToolsPanel.d.ts.map +0 -1
- package/dist/views/Tools/dictionary.d.ts.map +0 -1
- package/dist/views/Tools/dictionary.js.map +0 -1
- package/dist/views/Tools/index.d.ts.map +0 -1
- package/dist/views/Tools/utils.d.ts +0 -6
- package/dist/views/Tools/utils.d.ts.map +0 -1
- package/src/utils/agent.ts +0 -1
- package/src/views/Tools/StepModal.tsx +0 -247
- /package/dist/views/{Tools → Steps}/FlowChart/HandleGroup.d.ts +0 -0
- /package/dist/views/{Tools → Steps}/FlowChart/HandleGroup.js +0 -0
- /package/dist/views/{Tools → Steps}/FlowChart/NodeStep.d.ts +0 -0
- /package/dist/views/{Tools → Steps}/FlowChart/layout.d.ts +0 -0
- /package/dist/views/{Tools → Steps}/FlowChart/layout.js +0 -0
- /package/dist/views/{Tools → Steps}/FlowChart/styled.d.ts +0 -0
- /package/dist/views/{Tools → Steps}/FlowChart/types.js +0 -0
- /package/dist/views/{Tools → Steps}/utils.js +0 -0
- /package/src/views/{Tools → Steps}/FlowChart/HandleGroup.tsx +0 -0
- /package/src/views/{Tools → Steps}/FlowChart/layout.ts +0 -0
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
import { Flex, IconBox, Text } from '@citric/core'
|
|
2
|
-
import { ChevronDown, ChevronLeft, ChevronRight, Cog } from '@citric/icons'
|
|
3
|
-
import { Badge, IconButton } from '@citric/ui'
|
|
4
|
-
import { AnimatedHeight } from '@stack-spot/portal-components/AnimatedHeight'
|
|
5
|
-
import { listToClass, theme } from '@stack-spot/portal-theme'
|
|
6
|
-
import { interpolate } from '@stack-spot/portal-translate'
|
|
7
|
-
import { useEffect, useMemo, useState } from 'react'
|
|
8
|
-
import { styled } from 'styled-components'
|
|
9
|
-
import { Code } from '../../components/Code'
|
|
10
|
-
import { Markdown } from '../../components/Markdown'
|
|
11
|
-
import { Modal } from '../../components/Modal'
|
|
12
|
-
import { useChatEntry } from '../../context/hooks'
|
|
13
|
-
import { AgentTool, ChatEntry } from '../../state/ChatEntry'
|
|
14
|
-
import { useToolsDictionary } from './dictionary'
|
|
15
|
-
import { getTitle, toPrecision } from './utils'
|
|
16
|
-
|
|
17
|
-
interface Props {
|
|
18
|
-
message: ChatEntry,
|
|
19
|
-
stepId: string | undefined,
|
|
20
|
-
onClose: () => void,
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const StyledSection = styled.section`
|
|
24
|
-
padding: 18px 14px;
|
|
25
|
-
border-bottom: 1px solid var(--light-600);
|
|
26
|
-
display: flex;
|
|
27
|
-
flex-direction: column;
|
|
28
|
-
gap: 12px;
|
|
29
|
-
align-items: start;
|
|
30
|
-
|
|
31
|
-
&:last-child {
|
|
32
|
-
border-bottom: none;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
&.restrict-image-size img {
|
|
36
|
-
max-width: 100%;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.tool {
|
|
40
|
-
display: flex;
|
|
41
|
-
flex-direction: column;
|
|
42
|
-
align-items: start;
|
|
43
|
-
align-self: stretch;
|
|
44
|
-
gap: 6px;
|
|
45
|
-
background-color: ${theme.color.light[500]};
|
|
46
|
-
border-radius: 5px;
|
|
47
|
-
padding: 6px;
|
|
48
|
-
|
|
49
|
-
&.output {
|
|
50
|
-
padding: 0;
|
|
51
|
-
background-color: transparent;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.tool-header-wrapper {
|
|
55
|
-
background-color: ${theme.color.light[300]};
|
|
56
|
-
border-radius: 8px;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.tool-header {
|
|
60
|
-
padding: 4px 8px 4px 4px;
|
|
61
|
-
display: flex;
|
|
62
|
-
flex-direction: column;
|
|
63
|
-
gap: 12px;
|
|
64
|
-
position: relative;
|
|
65
|
-
|
|
66
|
-
&:before {
|
|
67
|
-
content: '';
|
|
68
|
-
top: 32px;
|
|
69
|
-
bottom: 8px;
|
|
70
|
-
left: 15px;
|
|
71
|
-
width: 1px;
|
|
72
|
-
background-color: ${theme.color.light[700]};
|
|
73
|
-
opacity: 0.3;
|
|
74
|
-
position: absolute;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.title {
|
|
78
|
-
display: flex;
|
|
79
|
-
gap: 8px;
|
|
80
|
-
align-items: center;
|
|
81
|
-
.tool-image {
|
|
82
|
-
width: 24px;
|
|
83
|
-
height: 24px;
|
|
84
|
-
border-radius: 50%;
|
|
85
|
-
overflow: hidden;
|
|
86
|
-
flex-shrink: 0;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.btn-expand {
|
|
91
|
-
transition: transform 0.3s ease-in-out;
|
|
92
|
-
&.open {
|
|
93
|
-
transform: rotate(180deg);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.duration {
|
|
98
|
-
opacity: 0.7;
|
|
99
|
-
text-align: right;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.description {
|
|
103
|
-
padding: 0 0 10px 20px;
|
|
104
|
-
opacity: 0.7;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.tool-input {
|
|
109
|
-
align-self: stretch;
|
|
110
|
-
&, .highlighter {
|
|
111
|
-
background: ${theme.color.light[300]} !important;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
`
|
|
116
|
-
|
|
117
|
-
const ExecutionBox = styled.div`
|
|
118
|
-
border-radius: 4px;
|
|
119
|
-
background-color: ${theme.color.light[500]};
|
|
120
|
-
color: ${theme.color.light[700]};
|
|
121
|
-
display: flex;
|
|
122
|
-
align-items: center;
|
|
123
|
-
.time {
|
|
124
|
-
padding: 6px 8px;
|
|
125
|
-
border-right: 1px solid ${theme.color.light[600]};
|
|
126
|
-
}
|
|
127
|
-
.navigator {
|
|
128
|
-
display: flex;
|
|
129
|
-
gap: 4px;
|
|
130
|
-
align-items: center;
|
|
131
|
-
padding: 2px 8px;
|
|
132
|
-
button {
|
|
133
|
-
width: 12px;
|
|
134
|
-
height: 12px;
|
|
135
|
-
padding: 0;
|
|
136
|
-
}
|
|
137
|
-
small {
|
|
138
|
-
line-height: 0.75rem;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
`
|
|
142
|
-
|
|
143
|
-
const ToolHeader = ({ tool }: { tool: AgentTool }) => {
|
|
144
|
-
const t = useToolsDictionary()
|
|
145
|
-
const [showDescription, setShowDescription] = useState(false)
|
|
146
|
-
return (
|
|
147
|
-
<AnimatedHeight className="tool-header-wrapper">
|
|
148
|
-
<div className="tool-header">
|
|
149
|
-
<div className="title">
|
|
150
|
-
{tool.image ? <img src={tool.image} className="tool-image" /> : <IconBox className="tool-image"><Cog /></IconBox>}
|
|
151
|
-
<Text colorScheme="light.700">{tool.name}</Text>
|
|
152
|
-
{tool.duration && <Text colorScheme="light.700" className="duration">
|
|
153
|
-
{interpolate(t.thoughtFor, toPrecision(tool.duration))}
|
|
154
|
-
</Text>}
|
|
155
|
-
{tool.description && <IconButton
|
|
156
|
-
size="xs"
|
|
157
|
-
className={listToClass(['btn-expand', showDescription && 'open'])}
|
|
158
|
-
onClick={() => setShowDescription(v => !v)}
|
|
159
|
-
aria-label={showDescription ? t.close : t.open}
|
|
160
|
-
>
|
|
161
|
-
<ChevronDown />
|
|
162
|
-
</IconButton>}
|
|
163
|
-
</div>
|
|
164
|
-
{showDescription && <Text className="description" colorScheme="light.700">{tool.description}</Text>}
|
|
165
|
-
</div>
|
|
166
|
-
</AnimatedHeight>
|
|
167
|
-
)
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export const StepModal = ({ message, stepId: initialStepId, onClose }: Props) => {
|
|
171
|
-
const t = useToolsDictionary()
|
|
172
|
-
const [stepId, setStepId] = useState(initialStepId)
|
|
173
|
-
const entry = useChatEntry(message)
|
|
174
|
-
const stepIndex = useMemo(() => entry.steps?.findIndex(s => s.id === stepId) ?? -1, [entry, stepId])
|
|
175
|
-
const step = entry.steps?.[stepIndex]
|
|
176
|
-
useEffect(() => setStepId(initialStepId), [initialStepId])
|
|
177
|
-
|
|
178
|
-
const inputTools = step?.tools?.map(tool => (
|
|
179
|
-
<div className="tool" key={tool.id}>
|
|
180
|
-
<ToolHeader tool={tool} />
|
|
181
|
-
<Text appearance="microtext1" colorScheme="light.700">{t.input}:</Text>
|
|
182
|
-
{tool.input && <Code language="json" className="tool-input" showLineNumbers={false}>{tool.input}</Code>}
|
|
183
|
-
</div>
|
|
184
|
-
))
|
|
185
|
-
|
|
186
|
-
const outputTools = step?.tools?.filter(tool => !!tool.output)?.map(tool => (
|
|
187
|
-
<div className="tool output" key={tool.id}>
|
|
188
|
-
<Badge appearance="square" palette="moss">{t.response}</Badge>
|
|
189
|
-
<ToolHeader tool={tool} />
|
|
190
|
-
<Text appearance="microtext1" colorScheme="light.700">{t.response}:</Text>
|
|
191
|
-
<Text appearance="microtext1">{tool.output}</Text>
|
|
192
|
-
</div>
|
|
193
|
-
))
|
|
194
|
-
|
|
195
|
-
function changeStep(amount: number) {
|
|
196
|
-
const next = entry.steps?.[stepIndex + amount]?.id
|
|
197
|
-
if (next) setStepId(next)
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
const title = (
|
|
201
|
-
<Flex flex={1} justifyContent="space-between" alignItems="center">
|
|
202
|
-
<Text appearance="h6">{getTitle(t, step, stepIndex)}</Text>
|
|
203
|
-
<ExecutionBox>
|
|
204
|
-
<Text className="time" appearance="microtext1">
|
|
205
|
-
{step?.status === 'running' && t.running}
|
|
206
|
-
{step?.status === 'pending' && t.pending}
|
|
207
|
-
{step?.status === 'success' && `${t.executionTime}: ${step?.duration ? `${toPrecision(step?.duration)}s` : t.unknown}`}
|
|
208
|
-
</Text>
|
|
209
|
-
<div className="navigator">
|
|
210
|
-
{step?.type !== 'planning' && (
|
|
211
|
-
<IconButton size="xs" appearance="text" title={t.previousStep} aria-label={t.previousStep} onClick={() => changeStep(-1)}>
|
|
212
|
-
<ChevronLeft />
|
|
213
|
-
</IconButton>
|
|
214
|
-
)}
|
|
215
|
-
{step?.type === 'step' && <Text appearance="microtext1">{stepIndex}/{(entry.steps?.length ?? 0) - 2}</Text>}
|
|
216
|
-
{step?.type !== 'answer' && (
|
|
217
|
-
<IconButton size="xs" appearance="text" title={t.nextStep} aria-label={t.nextStep} onClick={() => changeStep(1)}>
|
|
218
|
-
<ChevronRight />
|
|
219
|
-
</IconButton>
|
|
220
|
-
)}
|
|
221
|
-
</div>
|
|
222
|
-
</ExecutionBox>
|
|
223
|
-
</Flex>
|
|
224
|
-
)
|
|
225
|
-
|
|
226
|
-
return (
|
|
227
|
-
<Modal open={!!step} onClose={onClose} title={title}>
|
|
228
|
-
{step?.type === 'answer' && <StyledSection className="restrict-image-size">
|
|
229
|
-
{entry.type === 'md' ? <Markdown>{entry.content}</Markdown> : <Text>{entry.content}</Text>}
|
|
230
|
-
</StyledSection>}
|
|
231
|
-
{step?.input && <StyledSection>
|
|
232
|
-
<Badge appearance="square" palette="blue">Prompt</Badge>
|
|
233
|
-
<Text>{step.input}</Text>
|
|
234
|
-
{inputTools}
|
|
235
|
-
</StyledSection>}
|
|
236
|
-
{(outputTools?.length || step?.output) && (
|
|
237
|
-
<StyledSection>
|
|
238
|
-
{outputTools}
|
|
239
|
-
{step?.output && !outputTools?.length && <>
|
|
240
|
-
<Badge appearance="square" palette="moss">{t.response}</Badge>
|
|
241
|
-
<Text>{step.output}</Text>
|
|
242
|
-
</>}
|
|
243
|
-
</StyledSection>
|
|
244
|
-
)}
|
|
245
|
-
</Modal>
|
|
246
|
-
)
|
|
247
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|