@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.
Files changed (192) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/StackspotAIWidget.d.ts.map +1 -1
  3. package/dist/StackspotAIWidget.js +5 -2
  4. package/dist/StackspotAIWidget.js.map +1 -1
  5. package/dist/app-metadata.json +3 -3
  6. package/dist/chat-interceptors/send-message.d.ts.map +1 -1
  7. package/dist/chat-interceptors/send-message.js +2 -0
  8. package/dist/chat-interceptors/send-message.js.map +1 -1
  9. package/dist/components/Markdown.d.ts.map +1 -1
  10. package/dist/components/Markdown.js +1 -1
  11. package/dist/components/Markdown.js.map +1 -1
  12. package/dist/components/StackedBadge.d.ts +14 -0
  13. package/dist/components/StackedBadge.d.ts.map +1 -0
  14. package/dist/components/StackedBadge.js +56 -0
  15. package/dist/components/StackedBadge.js.map +1 -0
  16. package/dist/components/ToolBadge.d.ts +14 -0
  17. package/dist/components/ToolBadge.d.ts.map +1 -0
  18. package/dist/components/ToolBadge.js +108 -0
  19. package/dist/components/ToolBadge.js.map +1 -0
  20. package/dist/state/ChatEntry.d.ts +9 -16
  21. package/dist/state/ChatEntry.d.ts.map +1 -1
  22. package/dist/state/ChatEntry.js.map +1 -1
  23. package/dist/state/ChatState.d.ts +0 -1
  24. package/dist/state/ChatState.d.ts.map +1 -1
  25. package/dist/state/WidgetState.d.ts +3 -4
  26. package/dist/state/WidgetState.d.ts.map +1 -1
  27. package/dist/state/WidgetState.js +1 -12
  28. package/dist/state/WidgetState.js.map +1 -1
  29. package/dist/utils/check-is-trial.d.ts +2 -0
  30. package/dist/utils/check-is-trial.d.ts.map +1 -0
  31. package/dist/utils/check-is-trial.js +6 -0
  32. package/dist/utils/check-is-trial.js.map +1 -0
  33. package/dist/utils/tools.d.ts +7 -0
  34. package/dist/utils/tools.d.ts.map +1 -0
  35. package/dist/utils/tools.js +9 -0
  36. package/dist/utils/tools.js.map +1 -0
  37. package/dist/views/Agents/AgentDescription.d.ts.map +1 -1
  38. package/dist/views/Agents/AgentDescription.js +11 -1
  39. package/dist/views/Agents/AgentDescription.js.map +1 -1
  40. package/dist/views/Agents/AgentsPanel.d.ts.map +1 -1
  41. package/dist/views/Agents/AgentsPanel.js +13 -6
  42. package/dist/views/Agents/AgentsPanel.js.map +1 -1
  43. package/dist/views/Agents/AgentsTab.d.ts.map +1 -1
  44. package/dist/views/Agents/AgentsTab.js +10 -8
  45. package/dist/views/Agents/AgentsTab.js.map +1 -1
  46. package/dist/views/Agents/dictionary.d.ts +1 -1
  47. package/dist/views/Agents/dictionary.d.ts.map +1 -1
  48. package/dist/views/Agents/dictionary.js +2 -0
  49. package/dist/views/Agents/dictionary.js.map +1 -1
  50. package/dist/views/Agents/styled.js +1 -1
  51. package/dist/views/Chat/AgentInfo.js +3 -3
  52. package/dist/views/Chat/AgentInfo.js.map +1 -1
  53. package/dist/views/Chat/ChatMessage.d.ts.map +1 -1
  54. package/dist/views/Chat/ChatMessage.js +19 -4
  55. package/dist/views/Chat/ChatMessage.js.map +1 -1
  56. package/dist/views/Chat/StepsList.d.ts +2 -2
  57. package/dist/views/Chat/StepsList.d.ts.map +1 -1
  58. package/dist/views/Chat/StepsList.js +2 -2
  59. package/dist/views/Chat/StepsList.js.map +1 -1
  60. package/dist/views/Chat/styled.d.ts.map +1 -1
  61. package/dist/views/Chat/styled.js +21 -12
  62. package/dist/views/Chat/styled.js.map +1 -1
  63. package/dist/views/ChatTabSelection.d.ts.map +1 -1
  64. package/dist/views/ChatTabSelection.js +16 -2
  65. package/dist/views/ChatTabSelection.js.map +1 -1
  66. package/dist/views/KnowledgeSources.d.ts.map +1 -1
  67. package/dist/views/KnowledgeSources.js +10 -5
  68. package/dist/views/KnowledgeSources.js.map +1 -1
  69. package/dist/views/MessageInput/AgentSelector.d.ts +2 -1
  70. package/dist/views/MessageInput/AgentSelector.d.ts.map +1 -1
  71. package/dist/views/MessageInput/AgentSelector.js +15 -8
  72. package/dist/views/MessageInput/AgentSelector.js.map +1 -1
  73. package/dist/views/MessageInput/QuickCommandSelector.d.ts +2 -1
  74. package/dist/views/MessageInput/QuickCommandSelector.d.ts.map +1 -1
  75. package/dist/views/MessageInput/QuickCommandSelector.js +2 -2
  76. package/dist/views/MessageInput/QuickCommandSelector.js.map +1 -1
  77. package/dist/views/MessageInput/index.d.ts.map +1 -1
  78. package/dist/views/MessageInput/index.js +4 -2
  79. package/dist/views/MessageInput/index.js.map +1 -1
  80. package/dist/views/Stacks.d.ts.map +1 -1
  81. package/dist/views/Stacks.js +10 -5
  82. package/dist/views/Stacks.js.map +1 -1
  83. package/dist/views/{Tools → Steps}/FlowChart/HandleGroup.d.ts.map +1 -1
  84. package/dist/views/{Tools → Steps}/FlowChart/HandleGroup.js.map +1 -1
  85. package/dist/views/{Tools → Steps}/FlowChart/NodeStep.d.ts.map +1 -1
  86. package/dist/views/Steps/FlowChart/NodeStep.js +13 -0
  87. package/dist/views/Steps/FlowChart/NodeStep.js.map +1 -0
  88. package/dist/views/Steps/FlowChart/index.d.ts +10 -0
  89. package/dist/views/Steps/FlowChart/index.d.ts.map +1 -0
  90. package/dist/views/{Tools → Steps}/FlowChart/index.js +1 -5
  91. package/dist/views/{Tools → Steps}/FlowChart/index.js.map +1 -1
  92. package/dist/views/{Tools → Steps}/FlowChart/layout.d.ts.map +1 -1
  93. package/dist/views/{Tools → Steps}/FlowChart/layout.js.map +1 -1
  94. package/dist/views/{Tools → Steps}/FlowChart/styled.d.ts.map +1 -1
  95. package/dist/views/{Tools → Steps}/FlowChart/styled.js +0 -49
  96. package/dist/views/{Tools → Steps}/FlowChart/styled.js.map +1 -1
  97. package/dist/views/{Tools → Steps}/FlowChart/types.d.ts +3 -3
  98. package/dist/views/Steps/FlowChart/types.d.ts.map +1 -0
  99. package/dist/views/Steps/FlowChart/types.js.map +1 -0
  100. package/dist/views/Steps/StepModal.d.ts +9 -0
  101. package/dist/views/Steps/StepModal.d.ts.map +1 -0
  102. package/dist/views/Steps/StepModal.js +124 -0
  103. package/dist/views/Steps/StepModal.js.map +1 -0
  104. package/dist/views/Steps/StepsPanel.d.ts +6 -0
  105. package/dist/views/Steps/StepsPanel.d.ts.map +1 -0
  106. package/dist/views/{Tools/ToolsPanel.js → Steps/StepsPanel.js} +3 -3
  107. package/dist/views/{Tools/ToolsPanel.js.map → Steps/StepsPanel.js.map} +1 -1
  108. package/dist/views/{Tools → Steps}/dictionary.d.ts +9 -11
  109. package/dist/views/Steps/dictionary.d.ts.map +1 -0
  110. package/dist/views/{Tools → Steps}/dictionary.js +9 -11
  111. package/dist/views/Steps/dictionary.js.map +1 -0
  112. package/dist/views/{Tools → Steps}/index.d.ts +1 -1
  113. package/dist/views/Steps/index.d.ts.map +1 -0
  114. package/dist/views/{Tools → Steps}/index.js +10 -10
  115. package/dist/views/{Tools → Steps}/index.js.map +1 -1
  116. package/dist/views/Steps/utils.d.ts +6 -0
  117. package/dist/views/Steps/utils.d.ts.map +1 -0
  118. package/dist/views/{Tools → Steps}/utils.js.map +1 -1
  119. package/dist/views/Tools.d.ts +2 -0
  120. package/dist/views/Tools.d.ts.map +1 -0
  121. package/dist/views/Tools.js +51 -0
  122. package/dist/views/Tools.js.map +1 -0
  123. package/package.json +2 -2
  124. package/src/StackspotAIWidget.tsx +8 -3
  125. package/src/app-metadata.json +3 -3
  126. package/src/chat-interceptors/send-message.ts +2 -0
  127. package/src/components/Markdown.tsx +1 -0
  128. package/src/components/StackedBadge.tsx +77 -0
  129. package/src/components/ToolBadge.tsx +146 -0
  130. package/src/state/ChatEntry.ts +9 -17
  131. package/src/state/ChatState.ts +1 -1
  132. package/src/state/WidgetState.ts +4 -16
  133. package/src/utils/check-is-trial.ts +6 -0
  134. package/src/utils/tools.ts +11 -0
  135. package/src/views/Agents/AgentDescription.tsx +14 -0
  136. package/src/views/Agents/AgentsPanel.tsx +11 -3
  137. package/src/views/Agents/AgentsTab.tsx +11 -10
  138. package/src/views/Agents/dictionary.ts +2 -0
  139. package/src/views/Agents/styled.ts +1 -1
  140. package/src/views/Chat/AgentInfo.tsx +4 -4
  141. package/src/views/Chat/ChatMessage.tsx +30 -4
  142. package/src/views/Chat/StepsList.tsx +6 -6
  143. package/src/views/Chat/styled.ts +21 -12
  144. package/src/views/ChatTabSelection.tsx +22 -4
  145. package/src/views/KnowledgeSources.tsx +9 -3
  146. package/src/views/MessageInput/AgentSelector.tsx +19 -8
  147. package/src/views/MessageInput/QuickCommandSelector.tsx +3 -2
  148. package/src/views/MessageInput/index.tsx +5 -4
  149. package/src/views/Stacks.tsx +10 -4
  150. package/src/views/{Tools → Steps}/FlowChart/NodeStep.tsx +11 -23
  151. package/src/views/{Tools → Steps}/FlowChart/index.tsx +3 -7
  152. package/src/views/{Tools → Steps}/FlowChart/styled.ts +0 -49
  153. package/src/views/{Tools → Steps}/FlowChart/types.ts +3 -3
  154. package/src/views/Steps/StepModal.tsx +216 -0
  155. package/src/views/{Tools/ToolsPanel.tsx → Steps/StepsPanel.tsx} +2 -2
  156. package/src/views/{Tools → Steps}/dictionary.ts +9 -11
  157. package/src/views/{Tools → Steps}/index.tsx +10 -10
  158. package/src/views/{Tools → Steps}/utils.tsx +4 -4
  159. package/src/views/Tools.tsx +71 -0
  160. package/dist/utils/agent.d.ts +0 -2
  161. package/dist/utils/agent.d.ts.map +0 -1
  162. package/dist/utils/agent.js +0 -2
  163. package/dist/utils/agent.js.map +0 -1
  164. package/dist/views/Tools/FlowChart/NodeStep.js +0 -15
  165. package/dist/views/Tools/FlowChart/NodeStep.js.map +0 -1
  166. package/dist/views/Tools/FlowChart/index.d.ts +0 -9
  167. package/dist/views/Tools/FlowChart/index.d.ts.map +0 -1
  168. package/dist/views/Tools/FlowChart/types.d.ts.map +0 -1
  169. package/dist/views/Tools/FlowChart/types.js.map +0 -1
  170. package/dist/views/Tools/StepModal.d.ts +0 -9
  171. package/dist/views/Tools/StepModal.d.ts.map +0 -1
  172. package/dist/views/Tools/StepModal.js +0 -156
  173. package/dist/views/Tools/StepModal.js.map +0 -1
  174. package/dist/views/Tools/ToolsPanel.d.ts +0 -6
  175. package/dist/views/Tools/ToolsPanel.d.ts.map +0 -1
  176. package/dist/views/Tools/dictionary.d.ts.map +0 -1
  177. package/dist/views/Tools/dictionary.js.map +0 -1
  178. package/dist/views/Tools/index.d.ts.map +0 -1
  179. package/dist/views/Tools/utils.d.ts +0 -6
  180. package/dist/views/Tools/utils.d.ts.map +0 -1
  181. package/src/utils/agent.ts +0 -1
  182. package/src/views/Tools/StepModal.tsx +0 -247
  183. /package/dist/views/{Tools → Steps}/FlowChart/HandleGroup.d.ts +0 -0
  184. /package/dist/views/{Tools → Steps}/FlowChart/HandleGroup.js +0 -0
  185. /package/dist/views/{Tools → Steps}/FlowChart/NodeStep.d.ts +0 -0
  186. /package/dist/views/{Tools → Steps}/FlowChart/layout.d.ts +0 -0
  187. /package/dist/views/{Tools → Steps}/FlowChart/layout.js +0 -0
  188. /package/dist/views/{Tools → Steps}/FlowChart/styled.d.ts +0 -0
  189. /package/dist/views/{Tools → Steps}/FlowChart/types.js +0 -0
  190. /package/dist/views/{Tools → Steps}/utils.js +0 -0
  191. /package/src/views/{Tools → Steps}/FlowChart/HandleGroup.tsx +0 -0
  192. /package/src/views/{Tools → Steps}/FlowChart/layout.ts +0 -0
@@ -2,7 +2,8 @@ import { Dictionary, useTranslate } from '@stack-spot/portal-translate'
2
2
 
3
3
  export const dictionary = {
4
4
  en: {
5
- toolsDescription: 'A description for tools',
5
+ stepsPanelDescription: 'The steps and tools used to reach the answer',
6
+ steps: 'Steps',
6
7
  step: 'Step',
7
8
  response: 'Response',
8
9
  tools: 'Tools',
@@ -12,15 +13,15 @@ export const dictionary = {
12
13
  unknown: 'unknown',
13
14
  running: 'Running',
14
15
  pending: 'Pending',
15
- nextStep: 'Next step',
16
- previousStep: 'Previous step',
17
- thoughtFor: 'Thought for $0 seconds',
16
+ nextAttempt: 'Next execution',
17
+ previousAttempt: 'Previous execution',
18
18
  open: 'Open',
19
19
  close: 'Close',
20
20
  input: 'Input',
21
21
  },
22
22
  pt: {
23
- toolsDescription: 'Uma descrição para as Ferramentas',
23
+ stepsPanelDescription: 'Os passos e ferramentas usados para chegar na resposta',
24
+ steps: 'Passos',
24
25
  step: 'Passo',
25
26
  response: 'Resposta',
26
27
  tools: 'Ferramentas',
@@ -30,16 +31,13 @@ export const dictionary = {
30
31
  unknown: 'desconhecido',
31
32
  running: 'Executando',
32
33
  pending: 'Aguardando',
33
- nextStep: 'Próximo passo',
34
- previousStep: 'Passo anterior',
35
- thoughtFor: 'Pensado por $0 segundos',
36
- open: 'Open',
37
- close: 'Close',
34
+ nextAttempt: 'Próxima execução',
35
+ previousAttempt: 'Execução anterior',
38
36
  input: 'Entrada',
39
37
  },
40
38
  } satisfies Dictionary
41
39
 
42
- export function useToolsDictionary() {
40
+ export function useStepsDictionary() {
43
41
  return useTranslate(dictionary)
44
42
  }
45
43
 
@@ -3,31 +3,31 @@ import { LoadingCircular } from '@citric/ui'
3
3
  import { lazy, Suspense, useEffect } from 'react'
4
4
  import { useWidget, useWidgetState } from '../../context/hooks'
5
5
  import { useRightPanel } from '../../right-panel/hooks'
6
- import { useToolsDictionary } from './dictionary'
6
+ import { useStepsDictionary } from './dictionary'
7
7
 
8
- const LazyToolsPanel = lazy(() => import('./ToolsPanel'))
8
+ const LazyStepsPanel = lazy(() => import('./StepsPanel'))
9
9
 
10
10
  /**
11
11
  * Renders the Stack selection form in the Right Panel if this is the panel that is currently opened.
12
12
  */
13
- export const Tools = () => {
14
- const t = useToolsDictionary()
13
+ export const Steps = () => {
14
+ const t = useStepsDictionary()
15
15
  const panel = useWidgetState('panel')
16
- const message = useWidgetState('currentMessageInToolsPanel')
16
+ const message = useWidgetState('currentMessageInPanel')
17
17
  const { open } = useRightPanel()
18
18
  const widget = useWidget()
19
19
 
20
20
  useEffect(() => {
21
- if (panel === 'tools' && message) open(
21
+ if (panel === 'steps' && message) open(
22
22
  <Suspense fallback={<Flex alignItems="center" justifyContent="center" flex={1}><LoadingCircular /></Flex>}>
23
- <LazyToolsPanel key={message.messageId} chatId={message.chatId} messageId={message.messageId} />
23
+ <LazyStepsPanel key={message.messageId} chatId={message.chatId} messageId={message.messageId} />
24
24
  </Suspense>,
25
25
  {
26
- title: t.tools,
27
- description: t.toolsDescription,
26
+ title: t.steps,
27
+ description: t.stepsPanelDescription,
28
28
  onClose: () => {
29
29
  widget.set('panel', undefined)
30
- widget.set('currentMessageInToolsPanel', undefined)
30
+ widget.set('currentMessageInPanel', undefined)
31
31
  },
32
32
  },
33
33
  )
@@ -1,9 +1,9 @@
1
1
  import { IconBox } from '@citric/core'
2
2
  import { CheckCircleFill, ListUnordered, PlayFill, TimesCircleFill } from '@citric/icons'
3
3
  import { LoadingCircular } from '@citric/ui'
4
- import { ChatEntryStep } from '../../state/ChatEntry'
4
+ import { ChatStep } from '@stack-spot/portal-network'
5
5
 
6
- export function getStatusIcon(status: ChatEntryStep['status']) {
6
+ export function getStatusIcon(status: ChatStep['status']) {
7
7
  switch (status) {
8
8
  case 'success': return <IconBox colorIcon="success.500"><CheckCircleFill /></IconBox>
9
9
  case 'error': return <IconBox colorIcon="danger.500"><TimesCircleFill /></IconBox>
@@ -12,14 +12,14 @@ export function getStatusIcon(status: ChatEntryStep['status']) {
12
12
  }
13
13
  }
14
14
 
15
- export function getTypeIcon(type: ChatEntryStep['type']) {
15
+ export function getTypeIcon(type: ChatStep['type']) {
16
16
  switch (type) {
17
17
  case 'planning': return <ListUnordered />
18
18
  default: return <PlayFill />
19
19
  }
20
20
  }
21
21
 
22
- export function getTitle(translation: Record<'planning' | 'step' | 'answer', string>, step: ChatEntryStep | undefined, index: number) {
22
+ export function getTitle(translation: Record<'planning' | 'step' | 'answer', string>, step: ChatStep | undefined, index: number) {
23
23
  if (!step) return ''
24
24
  switch (step.type) {
25
25
  case 'planning': return translation.planning
@@ -0,0 +1,71 @@
1
+ import { agentClient } from '@stack-spot/portal-network'
2
+ import { Dictionary, useTranslate } from '@stack-spot/portal-translate'
3
+ import { useEffect, useMemo } from 'react'
4
+ import styled from 'styled-components'
5
+ import { ToolBadge } from '../components/ToolBadge'
6
+ import { useWidget, useWidgetState } from '../context/hooks'
7
+ import { useRightPanel } from '../right-panel/hooks'
8
+ import { toolById } from '../utils/tools'
9
+
10
+ const ToolList = styled.ul`
11
+ margin: 0;
12
+ padding: 0;
13
+ list-style: none;
14
+ display: flex;
15
+ flex-direction: column;
16
+ gap: 8px;
17
+ `
18
+
19
+ export const Tools = () => {
20
+ const t = useTranslate(dictionary)
21
+ const panel = useWidgetState('panel')
22
+ const message = useWidgetState('currentMessageInPanel')
23
+ const { open } = useRightPanel()
24
+ const widget = useWidget()
25
+
26
+ useEffect(() => {
27
+ if (panel === 'tools' && message) open(
28
+ <ToolsPanel key={message.messageId} />,
29
+ { title: t.title, description: t.description, onClose: () => widget.set('panel', undefined) },
30
+ )
31
+ }, [panel, t])
32
+
33
+ return null
34
+ }
35
+
36
+ const ToolsPanel = () => {
37
+ const { chatId, messageId } = useWidgetState('currentMessageInPanel') ?? {}
38
+ const widget = useWidget()
39
+ const message = useMemo(() => {
40
+ const chat = widget.chatTabs.getAll().find(c => c.id === chatId)
41
+ return chat?.getMessages().find(m => m.id === messageId)?.getValue()
42
+ }, [messageId])
43
+ const [agent] = agentClient.agent.useStatefulQuery({ agentId: message?.agent?.id ?? '' }, { enabled: !!message?.agent?.id })
44
+ const tools = useMemo(() => message?.tools?.map(id => toolById(id, agent?.toolkits) ?? { id }), [messageId, agent])
45
+
46
+ return !!tools?.length && (
47
+ <ToolList>
48
+ {tools.map((tool) => (
49
+ <li key={tool.id}>
50
+ <ToolBadge
51
+ name={tool.name || tool.id}
52
+ image={tool.image}
53
+ description={tool.description}
54
+ backgroundColor="light.500"
55
+ />
56
+ </li>
57
+ ))}
58
+ </ToolList>
59
+ )
60
+ }
61
+
62
+ const dictionary = {
63
+ en: {
64
+ title: 'Tools',
65
+ description: 'The tools used to generate the answer.',
66
+ },
67
+ pt: {
68
+ title: 'Ferramentas',
69
+ description: 'As ferramentas usadas para gerar a resposta.',
70
+ },
71
+ } satisfies Dictionary
@@ -1,2 +0,0 @@
1
- export declare const isAgentDefault: (agentSlug?: string) => agentSlug is "stk_code_buddy";
2
- //# sourceMappingURL=agent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/utils/agent.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,GAAI,YAAY,MAAM,kCAAmC,CAAA"}
@@ -1,2 +0,0 @@
1
- export const isAgentDefault = (agentSlug) => agentSlug === 'stk_code_buddy';
2
- //# sourceMappingURL=agent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/utils/agent.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,SAAkB,EAAE,EAAE,CAAC,SAAS,KAAK,gBAAgB,CAAA"}
@@ -1,15 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { IconBox, Text } from '@citric/core';
3
- import { Cog } from '@citric/icons';
4
- import { listToClass } from '@stack-spot/portal-theme';
5
- import { last } from 'lodash';
6
- import { useToolsDictionary } from '../dictionary.js';
7
- import { getStatusIcon, getTitle, getTypeIcon } from '../utils.js';
8
- import { HandleGroup } from './HandleGroup.js';
9
- export const NodeStep = ({ data: { step, index, nextStatus, onClick } }) => {
10
- const t = useToolsDictionary();
11
- return (_jsxs("div", { className: listToClass(['chart-node', step.type, nextStatus]), onClick: onClick, onKeyDown: e => e.key === 'Enter' && onClick?.(), tabIndex: 0, role: "button", "aria-label": getTitle(t, step, index), children: [_jsxs("header", { children: [_jsx(IconBox, { children: getTypeIcon(step.type) }), _jsx(Text, { className: "step-index", children: getTitle(t, step, index) }), getStatusIcon(step.status)] }), step.input && _jsx(Text, { className: "step-title", children: step.input }), step.type === 'step' && _jsxs("div", { className: "step-details", children: [_jsx(Text, { className: listToClass(['step-description', !!step.tools?.length && 'with-tools']), children: step.output || last(step.tools)?.output }), !!step.tools?.length && (_jsxs("div", { className: "step-tools", children: [_jsx(Text, { appearance: "microtext1", children: t.tools }), _jsx("ul", { children: step.tools.slice(0, 3).map(({ id, name, image }) => (_jsx("li", { children: image
12
- ? _jsx("img", { alt: name, "aria-label": name, title: name, src: image })
13
- : _jsx(IconBox, { size: "xs", "aria-label": name, title: name, children: _jsx(Cog, {}) }) }, id))) })] }))] }), _jsx(HandleGroup, { renderSource: step.type !== 'answer', renderTarget: step.type !== 'planning' })] }));
14
- };
15
- //# sourceMappingURL=NodeStep.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NodeStep.js","sourceRoot":"","sources":["../../../../src/views/Tools/FlowChart/NodeStep.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAO3C,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,EAAS,EAAE,EAAE;IAChF,MAAM,CAAC,GAAG,kBAAkB,EAAE,CAAA;IAE9B,OAAO,CACL,eACE,SAAS,EAAE,WAAW,CAAC,CAAC,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,EAC7D,OAAO,EAAE,O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AE,GAAG,EAAE,KAAK,GAAI;wCAC/D,CAAC,CAAC,KAAC,OAAO,IAAC,IAAI,EAAC,IAAI,gBAAa,IAAI,EAAE,KAAK,EAAE,IAAI,YAAE,KAAC,GAAG,KAAG,GAAU,IAHhE,EAAE,CAKN,CACN,CACF,GACE,IACD,CACP,IACG,EACN,KAAC,WAAW,IAAC,YAAY,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE,YAAY,EAAE,IAAI,CAAC,IAAI,KAAK,UAAU,GAAI,IACzF,CACP,CAAA;AACH,CAAC,CAAA"}
@@ -1,9 +0,0 @@
1
- import '@xyflow/react/dist/style.css';
2
- import { ChatEntry, ChatEntryStep } from '../../../state/ChatEntry.js';
3
- interface Props {
4
- message: ChatEntry;
5
- onClick: (step: ChatEntryStep, index: number) => void;
6
- }
7
- export declare const FlowChart: ({ message, onClick }: Props) => import("react/jsx-runtime").JSX.Element;
8
- export {};
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Tools/FlowChart/index.tsx"],"names":[],"mappings":"AAEA,OAAO,8BAA8B,CAAA;AAGrC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAKnE,UAAU,KAAK;IACb,OAAO,EAAE,SAAS,CAAC;IACnB,OAAO,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACvD;AAQD,eAAO,MAAM,SAAS,GAAI,sBAAsB,KAAK,4CAiDpD,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/views/Tools/FlowChart/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAExD,MAAM,WAAW,QAAQ;IACvB,UAAU,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;IAChD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC;IACrC,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/views/Tools/FlowChart/types.ts"],"names":[],"mappings":""}
@@ -1,9 +0,0 @@
1
- import { ChatEntry } from '../../state/ChatEntry.js';
2
- interface Props {
3
- message: ChatEntry;
4
- stepId: string | undefined;
5
- onClose: () => void;
6
- }
7
- export declare const StepModal: ({ message, stepId: initialStepId, onClose }: Props) => import("react/jsx-runtime").JSX.Element;
8
- export {};
9
- //# sourceMappingURL=StepModal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StepModal.d.ts","sourceRoot":"","sources":["../../../src/views/Tools/StepModal.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAa,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAI5D,UAAU,KAAK;IACb,OAAO,EAAE,SAAS,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAqJD,eAAO,MAAM,SAAS,GAAI,6CAA6C,KAAK,4CA6E3E,CAAA"}
@@ -1,156 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Flex, IconBox, Text } from '@citric/core';
3
- import { ChevronDown, ChevronLeft, ChevronRight, Cog } from '@citric/icons';
4
- import { Badge, IconButton } from '@citric/ui';
5
- import { AnimatedHeight } from '@stack-spot/portal-components/AnimatedHeight';
6
- import { listToClass, theme } from '@stack-spot/portal-theme';
7
- import { interpolate } from '@stack-spot/portal-translate';
8
- import { useEffect, useMemo, useState } from 'react';
9
- import { styled } from 'styled-components';
10
- import { Code } from '../../components/Code.js';
11
- import { Markdown } from '../../components/Markdown.js';
12
- import { Modal } from '../../components/Modal.js';
13
- import { useChatEntry } from '../../context/hooks.js';
14
- import { useToolsDictionary } from './dictionary.js';
15
- import { getTitle, toPrecision } from './utils.js';
16
- const StyledSection = styled.section `
17
- padding: 18px 14px;
18
- border-bottom: 1px solid var(--light-600);
19
- display: flex;
20
- flex-direction: column;
21
- gap: 12px;
22
- align-items: start;
23
-
24
- &:last-child {
25
- border-bottom: none;
26
- }
27
-
28
- &.restrict-image-size img {
29
- max-width: 100%;
30
- }
31
-
32
- .tool {
33
- display: flex;
34
- flex-direction: column;
35
- align-items: start;
36
- align-self: stretch;
37
- gap: 6px;
38
- background-color: ${theme.color.light[500]};
39
- border-radius: 5px;
40
- padding: 6px;
41
-
42
- &.output {
43
- padding: 0;
44
- background-color: transparent;
45
- }
46
-
47
- .tool-header-wrapper {
48
- background-color: ${theme.color.light[300]};
49
- border-radius: 8px;
50
- }
51
-
52
- .tool-header {
53
- padding: 4px 8px 4px 4px;
54
- display: flex;
55
- flex-direction: column;
56
- gap: 12px;
57
- position: relative;
58
-
59
- &:before {
60
- content: '';
61
- top: 32px;
62
- bottom: 8px;
63
- left: 15px;
64
- width: 1px;
65
- background-color: ${theme.color.light[700]};
66
- opacity: 0.3;
67
- position: absolute;
68
- }
69
-
70
- .title {
71
- display: flex;
72
- gap: 8px;
73
- align-items: center;
74
- .tool-image {
75
- width: 24px;
76
- height: 24px;
77
- border-radius: 50%;
78
- overflow: hidden;
79
- flex-shrink: 0;
80
- }
81
- }
82
-
83
- .btn-expand {
84
- transition: transform 0.3s ease-in-out;
85
- &.open {
86
- transform: rotate(180deg);
87
- }
88
- }
89
-
90
- .duration {
91
- opacity: 0.7;
92
- text-align: right;
93
- }
94
-
95
- .description {
96
- padding: 0 0 10px 20px;
97
- opacity: 0.7;
98
- }
99
- }
100
-
101
- .tool-input {
102
- align-self: stretch;
103
- &, .highlighter {
104
- background: ${theme.color.light[300]} !important;
105
- }
106
- }
107
- }
108
- `;
109
- const ExecutionBox = styled.div `
110
- border-radius: 4px;
111
- background-color: ${theme.color.light[500]};
112
- color: ${theme.color.light[700]};
113
- display: flex;
114
- align-items: center;
115
- .time {
116
- padding: 6px 8px;
117
- border-right: 1px solid ${theme.color.light[600]};
118
- }
119
- .navigator {
120
- display: flex;
121
- gap: 4px;
122
- align-items: center;
123
- padding: 2px 8px;
124
- button {
125
- width: 12px;
126
- height: 12px;
127
- padding: 0;
128
- }
129
- small {
130
- line-height: 0.75rem;
131
- }
132
- }
133
- `;
134
- const ToolHeader = ({ tool }) => {
135
- const t = useToolsDictionary();
136
- const [showDescription, setShowDescription] = useState(false);
137
- return (_jsx(AnimatedHeight, { className: "tool-header-wrapper", children: _jsxs("div", { className: "tool-header", children: [_jsxs("div", { className: "title", children: [tool.image ? _jsx("img", { src: tool.image, className: "tool-image" }) : _jsx(IconBox, { className: "tool-image", children: _jsx(Cog, {}) }), _jsx(Text, { colorScheme: "light.700", children: tool.name }), tool.duration && _jsx(Text, { colorScheme: "light.700", className: "duration", children: interpolate(t.thoughtFor, toPrecision(tool.duration)) }), tool.description && _jsx(IconButton, { size: "xs", className: listToClass(['btn-expand', showDescription && 'open']), onClick: () => setShowDescription(v => !v), "aria-label": showDescription ? t.close : t.open, children: _jsx(ChevronDown, {}) })] }), showDescription && _jsx(Text, { className: "description", colorScheme: "light.700", children: tool.description })] }) }));
138
- };
139
- export const StepModal = ({ message, stepId: initialStepId, onClose }) => {
140
- const t = useToolsDictionary();
141
- const [stepId, setStepId] = useState(initialStepId);
142
- const entry = useChatEntry(message);
143
- const stepIndex = useMemo(() => entry.steps?.findIndex(s => s.id === stepId) ?? -1, [entry, stepId]);
144
- const step = entry.steps?.[stepIndex];
145
- useEffect(() => setStepId(initialStepId), [initialStepId]);
146
- const inputTools = step?.tools?.map(tool => (_jsxs("div", { className: "tool", children: [_jsx(ToolHeader, { tool: tool }), _jsxs(Text, { appearance: "microtext1", colorScheme: "light.700", children: [t.input, ":"] }), tool.input && _jsx(Code, { language: "json", className: "tool-input", showLineNumbers: false, children: tool.input })] }, tool.id)));
147
- const outputTools = step?.tools?.filter(tool => !!tool.output)?.map(tool => (_jsxs("div", { className: "tool output", children: [_jsx(Badge, { appearance: "square", palette: "moss", children: t.response }), _jsx(ToolHeader, { tool: tool }), _jsxs(Text, { appearance: "microtext1", colorScheme: "light.700", children: [t.response, ":"] }), _jsx(Text, { appearance: "microtext1", children: tool.output })] }, tool.id)));
148
- function changeStep(amount) {
149
- const next = entry.steps?.[stepIndex + amount]?.id;
150
- if (next)
151
- setStepId(next);
152
- }
153
- const title = (_jsxs(Flex, { flex: 1, justifyContent: "space-between", alignItems: "center", children: [_jsx(Text, { appearance: "h6", children: getTitle(t, step, stepIndex) }), _jsxs(ExecutionBox, { children: [_jsxs(Text, { className: "time", appearance: "microtext1", children: [step?.status === 'running' && t.running, step?.status === 'pending' && t.pending, step?.status === 'success' && `${t.executionTime}: ${step?.duration ? `${toPrecision(step?.duration)}s` : t.unknown}`] }), _jsxs("div", { className: "navigator", children: [step?.type !== 'planning' && (_jsx(IconButton, { size: "xs", appearance: "text", title: t.previousStep, "aria-label": t.previousStep, onClick: () => changeStep(-1), children: _jsx(ChevronLeft, {}) })), step?.type === 'step' && _jsxs(Text, { appearance: "microtext1", children: [stepIndex, "/", (entry.steps?.length ?? 0) - 2] }), step?.type !== 'answer' && (_jsx(IconButton, { size: "xs", appearance: "text", title: t.nextStep, "aria-label": t.nextStep, onClick: () => changeStep(1), children: _jsx(ChevronRight, {}) }))] })] })] }));
154
- return (_jsxs(Modal, { open: !!step, onClose: onClose, title: title, children: [step?.type === 'answer' && _jsx(StyledSection, { className: "restrict-image-size", children: entry.type === 'md' ? _jsx(Markdown, { children: entry.content }) : _jsx(Text, { children: entry.content }) }), step?.input && _jsxs(StyledSection, { children: [_jsx(Badge, { appearance: "square", palette: "blue", children: "Prompt" }), _jsx(Text, { children: step.input }), inputTools] }), (outputTools?.length || step?.output) && (_jsxs(StyledSection, { children: [outputTools, step?.output && !outputTools?.length && _jsxs(_Fragment, { children: [_jsx(Badge, { appearance: "square", palette: "moss", children: t.response }), _jsx(Text, { children: step.output })] })] }))] }));
155
- };
156
- //# sourceMappingURL=StepModal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StepModal.js","sourceRoot":"","sources":["../../../src/views/Tools/StepModal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,eAAe,CAAA;AAC3E,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAA;AAC7E,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAQ/C,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAA;;;;;;;;;;;;;;;;;;;;;;wBAsBZ,KAAK,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C,KAAK,EAAE,CAAC,CAAC,QAAQ,gBAAc,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,YAC7G,KAAC,YAAY,KAAG,GACL,CACd,IACG,IACO,IACV,CACR,CAAA;IAED,OAAO,CACL,MAAC,KAAK,IAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,aAChD,IAAI,EAAE,IAAI,KAAK,QAAQ,IAAI,KAAC,aAAa,IAAC,SAAS,EAAC,qBAAqB,YACvE,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,KAAC,QAAQ,cAAE,KAAK,CAAC,OAAO,GAAY,CAAC,CAAC,CAAC,KAAC,IAAI,cAAE,KAAK,CAAC,OAAO,GAAQ,GAC5E,EACf,IAAI,EAAE,KAAK,IAAI,MAAC,aAAa,eAC5B,KAAC,KAAK,IAAC,UAAU,EAAC,QAAQ,EAAC,OAAO,EAAC,MAAM,uBAAe,EACxD,KAAC,IAAI,cAAE,IAAI,CAAC,KAAK,GAAQ,EACxB,UAAU,IACG,EACf,CAAC,WAAW,EAAE,MAAM,IAAI,IAAI,EAAE,MAAM,CAAC,IAAI,CACxC,MAAC,aAAa,eACX,WAAW,EACX,IAAI,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,MAAM,IAAI,8BACvC,KAAC,KAAK,IAAC,UAAU,EAAC,QAAQ,EAAC,OAAO,EAAC,MAAM,YAAE,CAAC,CAAC,QAAQ,GAAS,EAC9D,KAAC,IAAI,cAAE,IAAI,CAAC,MAAM,GAAQ,IACzB,IACW,CACjB,IACK,CACT,CAAA;AACH,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- declare const ToolsPanel: ({ chatId, messageId }: {
2
- chatId: string;
3
- messageId: number;
4
- }) => import("react/jsx-runtime").JSX.Element | null;
5
- export default ToolsPanel;
6
- //# sourceMappingURL=ToolsPanel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ToolsPanel.d.ts","sourceRoot":"","sources":["../../../src/views/Tools/ToolsPanel.tsx"],"names":[],"mappings":"AAOA,QAAA,MAAM,UAAU,GAAI,uBAAuB;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,mDAc/E,CAAA;AAED,eAAe,UAAU,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../src/views/Tools/dictionary.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCD,CAAA;AAEtB,wBAAgB,kBAAkB,+NAEjC;AAED,MAAM,MAAM,eAAe,GAAG,OAAO,UAAU,CAAC,IAAI,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"dictionary.js","sourceRoot":"","sources":["../../../src/views/Tools/dictionary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAEvE,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,EAAE,EAAE;QACF,gBAAgB,EAAE,yBAAyB;QAC3C,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,cAAc;QACtB,aAAa,EAAE,MAAM;QACrB,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,WAAW;QACrB,YAAY,EAAE,eAAe;QAC7B,UAAU,EAAE,wBAAwB;QACpC,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,OAAO;KACf;IACD,EAAE,EAAE;QACF,gBAAgB,EAAE,mCAAmC;QACrD,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,aAAa;QACpB,QAAQ,EAAE,cAAc;QACxB,MAAM,EAAE,gBAAgB;QACxB,aAAa,EAAE,OAAO;QACtB,OAAO,EAAE,cAAc;QACvB,OAAO,EAAE,YAAY;QACrB,OAAO,EAAE,YAAY;QACrB,QAAQ,EAAE,eAAe;QACzB,YAAY,EAAE,gBAAgB;QAC9B,UAAU,EAAE,yBAAyB;QACrC,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,SAAS;KACjB;CACmB,CAAA;AAEtB,MAAM,UAAU,kBAAkB;IAChC,OAAO,YAAY,CAAC,UAAU,CAAC,CAAA;AACjC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/views/Tools/index.tsx"],"names":[],"mappings":"AASA;;GAEG;AACH,eAAO,MAAM,KAAK,YAwBjB,CAAA"}
@@ -1,6 +0,0 @@
1
- import { ChatEntryStep } from '../../state/ChatEntry.js';
2
- export declare function getStatusIcon(status: ChatEntryStep['status']): import("react/jsx-runtime").JSX.Element | null;
3
- export declare function getTypeIcon(type: ChatEntryStep['type']): import("react/jsx-runtime").JSX.Element;
4
- export declare function getTitle(translation: Record<'planning' | 'step' | 'answer', string>, step: ChatEntryStep | undefined, index: number): string;
5
- export declare function toPrecision(n: number, precisionDigits?: number): number;
6
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/views/Tools/utils.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAErD,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,kDAO5D;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,2CAKtD;AAED,wBAAgB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,GAAG,QAAQ,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,aAAa,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,UAOnI;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,eAAe,SAAI,UAGzD"}
@@ -1 +0,0 @@
1
- export const isAgentDefault = (agentSlug?: string) => agentSlug === 'stk_code_buddy'