Unverified 提交 5dee6f7a authored 作者: Mohamed Aziz Mejri's avatar Mohamed Aziz Mejri 提交者: GitHub

Fix : Keep plus button enabled while streaming (#2117)

<!-- This is an auto-generated description by cubic. --> ## Summary by cubic Keep the + button in chat enabled while a message is streaming, so users can attach files or toggle the token bar without waiting. Removed the disabled prop from AuxiliaryActionsMenu and stopped passing disabled={isStreaming} from ChatInput. <sup>Written for commit fbe88ac6e708be9e06c9d7a8afe08a913905bddf. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. -->
上级 c08b2311
...@@ -19,14 +19,12 @@ interface AuxiliaryActionsMenuProps { ...@@ -19,14 +19,12 @@ interface AuxiliaryActionsMenuProps {
files: FileList, files: FileList,
type: "chat-context" | "upload-to-codebase", type: "chat-context" | "upload-to-codebase",
) => void; ) => void;
disabled?: boolean;
showTokenBar: boolean; showTokenBar: boolean;
toggleShowTokenBar: () => void; toggleShowTokenBar: () => void;
} }
export function AuxiliaryActionsMenu({ export function AuxiliaryActionsMenu({
onFileSelect, onFileSelect,
disabled,
showTokenBar, showTokenBar,
toggleShowTokenBar, toggleShowTokenBar,
}: AuxiliaryActionsMenuProps) { }: AuxiliaryActionsMenuProps) {
...@@ -38,7 +36,6 @@ export function AuxiliaryActionsMenu({ ...@@ -38,7 +36,6 @@ export function AuxiliaryActionsMenu({
<Button <Button
variant="ghost" variant="ghost"
size="sm" size="sm"
disabled={disabled}
className="has-[>svg]:px-2 hover:bg-muted bg-primary/10 text-primary cursor-pointer rounded-xl" className="has-[>svg]:px-2 hover:bg-muted bg-primary/10 text-primary cursor-pointer rounded-xl"
data-testid="auxiliary-actions-menu" data-testid="auxiliary-actions-menu"
> >
......
...@@ -476,7 +476,6 @@ export function ChatInput({ chatId }: { chatId?: number }) { ...@@ -476,7 +476,6 @@ export function ChatInput({ chatId }: { chatId?: number }) {
<AuxiliaryActionsMenu <AuxiliaryActionsMenu
onFileSelect={handleFileSelect} onFileSelect={handleFileSelect}
disabled={isStreaming}
showTokenBar={showTokenBar} showTokenBar={showTokenBar}
toggleShowTokenBar={toggleShowTokenBar} toggleShowTokenBar={toggleShowTokenBar}
/> />
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论