fix: remove unused isStreaming prop from quickActions
The isStreaming prop was passed through multiple chat components but wasn't being strict enough in the Markdown component where it was ultimately passed causing the quick actions to be disabled.
This commit is contained in:
@@ -16,7 +16,6 @@ interface AssistantMessageProps {
|
||||
append?: (message: Message) => void;
|
||||
chatMode?: 'discuss' | 'build';
|
||||
setChatMode?: (mode: 'discuss' | 'build') => void;
|
||||
isStreaming?: boolean;
|
||||
}
|
||||
|
||||
function openArtifactInWorkbench(filePath: string) {
|
||||
@@ -44,17 +43,7 @@ function normalizedFilePath(path: string) {
|
||||
}
|
||||
|
||||
export const AssistantMessage = memo(
|
||||
({
|
||||
content,
|
||||
annotations,
|
||||
messageId,
|
||||
onRewind,
|
||||
onFork,
|
||||
append,
|
||||
chatMode,
|
||||
setChatMode,
|
||||
isStreaming,
|
||||
}: AssistantMessageProps) => {
|
||||
({ content, annotations, messageId, onRewind, onFork, append, chatMode, setChatMode }: AssistantMessageProps) => {
|
||||
const filteredAnnotations = (annotations?.filter(
|
||||
(annotation: JSONValue) =>
|
||||
annotation && typeof annotation === 'object' && Object.keys(annotation).includes('type'),
|
||||
@@ -152,7 +141,7 @@ export const AssistantMessage = memo(
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
<Markdown append={append} chatMode={chatMode} setChatMode={setChatMode} isStreaming={isStreaming} html>
|
||||
<Markdown append={append} chatMode={chatMode} setChatMode={setChatMode} html>
|
||||
{content}
|
||||
</Markdown>
|
||||
</div>
|
||||
|
||||
@@ -18,11 +18,10 @@ interface MarkdownProps {
|
||||
append?: (message: Message) => void;
|
||||
chatMode?: 'discuss' | 'build';
|
||||
setChatMode?: (mode: 'discuss' | 'build') => void;
|
||||
isStreaming?: boolean;
|
||||
}
|
||||
|
||||
export const Markdown = memo(
|
||||
({ children, html = false, limitedMarkdown = false, append, setChatMode, isStreaming }: MarkdownProps) => {
|
||||
({ children, html = false, limitedMarkdown = false, append, setChatMode }: MarkdownProps) => {
|
||||
logger.trace('Render');
|
||||
|
||||
const components = useMemo(() => {
|
||||
@@ -102,7 +101,6 @@ export const Markdown = memo(
|
||||
data-message={message}
|
||||
data-path={path}
|
||||
data-href={href}
|
||||
disabled={isStreaming}
|
||||
onClick={() => {
|
||||
if (type === 'file') {
|
||||
openArtifactInWorkbench(path);
|
||||
|
||||
@@ -100,7 +100,6 @@ export const Messages = forwardRef<HTMLDivElement, MessagesProps>(
|
||||
append={props.append}
|
||||
chatMode={props.chatMode}
|
||||
setChatMode={props.setChatMode}
|
||||
isStreaming={isStreaming}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user