@stack-spot/ai-chat-widget 2.4.1 → 2.4.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 +9 -0
- package/dist/app-metadata.json +5 -5
- package/dist/chat-interceptors/send-message.d.ts +16 -1
- package/dist/chat-interceptors/send-message.d.ts.map +1 -1
- package/dist/chat-interceptors/send-message.js +148 -138
- package/dist/chat-interceptors/send-message.js.map +1 -1
- package/dist/features.d.ts +4 -0
- package/dist/features.d.ts.map +1 -1
- package/dist/features.js +1 -0
- package/dist/features.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/state/ChatEntry.d.ts +13 -1
- package/dist/state/ChatEntry.d.ts.map +1 -1
- package/dist/state/ChatEntry.js.map +1 -1
- package/dist/views/Chat/StepsList.js +3 -3
- package/dist/views/Chat/StepsList.js.map +1 -1
- package/dist/views/MessageInput/ButtonBar.js +1 -1
- package/dist/views/MessageInput/ButtonBar.js.map +1 -1
- package/package.json +4 -4
- package/src/app-metadata.json +5 -5
- package/src/chat-interceptors/send-message.ts +162 -148
- package/src/features.ts +8 -3
- package/src/index.ts +2 -0
- package/src/state/ChatEntry.ts +19 -7
- package/src/views/Chat/StepsList.tsx +3 -3
- package/src/views/MessageInput/ButtonBar.tsx +1 -1
- package/src/views/MessageInput/index.tsx +2 -2
|
@@ -50,14 +50,14 @@ const StepAccordionHeader = ({ step, index, expand }: Pick<StepProps, 'step' | '
|
|
|
50
50
|
return <Row gap="8px">
|
|
51
51
|
{expand}
|
|
52
52
|
{step.status === 'target' ? <Text className="step-title" appearance="body2" color="light.700">{t.planGoal}:</Text> :
|
|
53
|
-
<Badge colorScheme="inverse" appearance="square">
|
|
53
|
+
<Badge colorScheme="inverse" appearance="square" style={{ whiteSpace: 'nowrap' }}>
|
|
54
54
|
{t.step} {index}
|
|
55
55
|
</Badge>}
|
|
56
56
|
<Text className="step-title" appearance="body2">
|
|
57
57
|
{step.input}
|
|
58
58
|
</Text>
|
|
59
59
|
{step.status === 'awaiting_approval' &&
|
|
60
|
-
<Badge appearance="square" style={{ backgroundColor: theme.color.gray[800], color: theme.color.gray[50] }}>
|
|
60
|
+
<Badge appearance="square" style={{ backgroundColor: theme.color.gray[800], color: theme.color.gray[50], whiteSpace: 'nowrap' }}>
|
|
61
61
|
<Icon icon="Security" />
|
|
62
62
|
{t.pendingReview}
|
|
63
63
|
</Badge>}
|
|
@@ -199,7 +199,7 @@ export const ToolStepsList = ({ toolStep, messageId, chatId }: { toolStep: ToolC
|
|
|
199
199
|
return <>
|
|
200
200
|
{toolStep && tool ? <AnimatedHeight>
|
|
201
201
|
<div className="steps">
|
|
202
|
-
<Badge colorPalette="yellow" appearance="square">
|
|
202
|
+
<Badge colorPalette="yellow" appearance="square" style={{ whiteSpace: 'nowrap' }}>
|
|
203
203
|
<Icon icon="StopWatch" />
|
|
204
204
|
<Text>{tool.name} {t.keepWorking}</Text>
|
|
205
205
|
</Badge>
|
|
@@ -30,7 +30,7 @@ export const ButtonBar = ({ onSend, isLoading }: SelectionBarProps) => {
|
|
|
30
30
|
<IconButton icon="Code" appearance="square" aria-label={t.code} title={t.code} onClick={() => widget.set('panel', 'editor')} />
|
|
31
31
|
)}
|
|
32
32
|
</Row>
|
|
33
|
-
<ModelSwitcher />
|
|
33
|
+
{features.showLLMSelect && <ModelSwitcher />}
|
|
34
34
|
{isLoading ? (
|
|
35
35
|
<IconButton
|
|
36
36
|
icon="Stop"
|
|
@@ -24,7 +24,7 @@ import { UploadDragNDrop, useUploadDragDrop } from './UploadDragNDrop'
|
|
|
24
24
|
* going to be used for the question and the buttons to send, cancel, set the workspace, among others. This also includes the Quick
|
|
25
25
|
* Commands panel for auto completing.
|
|
26
26
|
*/
|
|
27
|
-
export const MessageInput = ({ chatWindowRef, customInputMessage }:
|
|
27
|
+
export const MessageInput = ({ chatWindowRef, customInputMessage }:
|
|
28
28
|
{ chatWindowRef?: React.RefObject<HTMLElement>, customInputMessage?: string }) => {
|
|
29
29
|
const t = useMessageInputDictionary()
|
|
30
30
|
const [focused, setFocused] = useState(false)
|
|
@@ -96,7 +96,7 @@ export const MessageInput = ({ chatWindowRef, customInputMessage }:
|
|
|
96
96
|
if (!checkSendRequirements()) return
|
|
97
97
|
|
|
98
98
|
// Compose prompt with code block if needed
|
|
99
|
-
const prompt = code && !quickCommandRegex.test(message ?? '') ? `${message}\n\`\`\`${language}\n${code}\n\`\`\`` : message
|
|
99
|
+
const prompt = code && !quickCommandRegex.test(message ?? '') ? `${message}\n\`\`\`${language}\n${code}\n\`\`\`` : message
|
|
100
100
|
|
|
101
101
|
// Validate prompt length
|
|
102
102
|
if (!checkPromptMaxLength(prompt || '')) return
|