🔧 fix: Dev Deployment, Mistral OCR Error, and UI Consistency (#7668)

* 🔧 fix: Update ProgressText and ToolCall components for improved error handling and localization

* 🔧 chore: Format ESLint configuration for improved readability and remove unused rule

* 🔧 refactor: Simplify ProgressText component logic for better readability and maintainability

* 🔧 refactor: Update ProgressText and ToolCall components for improved layout consistency

* 🔧 refactor: Simplify icon rendering in TTS components and enhance button rendering logic in HoverButtons

* 🔧 refactor: Update placeholder logic in VariableForm component to simply use variable name

* fix: .docx. .pptx Mistral OCR Error with `image_limit=0`

* chore: Update deploy workflow to include conditions for successful dev branch deployment and streamline deployment steps

* ci: Set image_limit to 0 in MistralOCR service tests for consistent behavior
This commit is contained in:
Danny Avila 2025-06-01 17:48:19 -04:00 committed by GitHub
parent a2fc7d312a
commit f9d40784f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 95 additions and 52 deletions

View file

@ -59,7 +59,30 @@ export default function ProgressText({
isExpanded?: boolean;
error?: boolean;
}) {
const text = progress < 1 ? (authText ?? inProgressText) : finishedText;
const getText = () => {
if (error) {
return finishedText;
}
if (progress < 1) {
return authText ?? inProgressText;
}
return finishedText;
};
const getIcon = () => {
if (error) {
return <CancelledIcon />;
}
if (progress < 1) {
return <Spinner />;
}
return <FinishedIcon />;
};
const text = getText();
const icon = getIcon();
const showShimmer = progress < 1 && !error;
return (
<Wrapper popover={popover}>
<button
@ -71,13 +94,13 @@ export default function ProgressText({
disabled={!hasInput}
onClick={hasInput ? onClick : undefined}
>
{progress < 1 ? <Spinner /> : error ? <CancelledIcon /> : <FinishedIcon />}
<span className={`${progress < 1 ? 'shimmer' : ''}`}>{text}</span>
{icon}
<span className={showShimmer ? 'shimmer' : ''}>{text}</span>
{hasInput &&
(isExpanded ? (
<ChevronUp className="size-4 translate-y-[1px]" />
<ChevronUp className="size-4 shrink-0 translate-y-[1px]" />
) : (
<ChevronDown className="size-4 translate-y-[1px]" />
<ChevronDown className="size-4 shrink-0 translate-y-[1px]" />
))}
</button>
</Wrapper>

View file

@ -97,7 +97,7 @@ export default function ToolCall({
const getFinishedText = () => {
if (cancelled) {
return localize('com_ui_error');
return localize('com_ui_cancelled');
}
if (isMCPToolCall === true) {
return localize('com_assistants_completed_function', { 0: function_name });
@ -153,7 +153,7 @@ export default function ToolCall({
return (
<>
<div className="relative my-2.5 flex size-5 shrink-0 items-center gap-2.5">
<div className="relative my-2.5 flex h-5 shrink-0 items-center gap-2.5">
<ProgressText
progress={progress}
onClick={() => setShowInfo((prev) => !prev)}