diff --git a/client/src/components/Chat/Messages/Content/CodeAnalyze.tsx b/client/src/components/Chat/Messages/Content/CodeAnalyze.tsx
index d062f4276a..f0918240ba 100644
--- a/client/src/components/Chat/Messages/Content/CodeAnalyze.tsx
+++ b/client/src/components/Chat/Messages/Content/CodeAnalyze.tsx
@@ -7,6 +7,9 @@ import FinishedIcon from './FinishedIcon';
import MarkdownLite from './MarkdownLite';
import store from '~/store';
+const radius = 56.08695652173913;
+const circumference = 2 * Math.PI * radius;
+
export default function CodeAnalyze({
initialProgress = 0.1,
code,
@@ -22,9 +25,6 @@ export default function CodeAnalyze({
const progress = useProgress(initialProgress);
const showAnalysisCode = useRecoilValue(store.showCode);
const [showCode, setShowCode] = useState(showAnalysisCode);
-
- const radius = 56.08695652173913;
- const circumference = 2 * Math.PI * radius;
const offset = circumference - progress * circumference;
const logs = outputs.reduce((acc, output) => {
@@ -53,9 +53,10 @@ export default function CodeAnalyze({
setShowCode((prev) => !prev)}
- inProgressText="Analyzing"
- finishedText="Finished analyzing"
+ inProgressText={localize('com_ui_analyzing')}
+ finishedText={localize('com_ui_analyzing_finished')}
hasInput={!!code.length}
+ isExpanded={showCode}
/>
{showCode && (
diff --git a/client/src/components/Chat/Messages/Content/Parts/ExecuteCode.tsx b/client/src/components/Chat/Messages/Content/Parts/ExecuteCode.tsx
index 49a15fc71c..93fdab434e 100644
--- a/client/src/components/Chat/Messages/Content/Parts/ExecuteCode.tsx
+++ b/client/src/components/Chat/Messages/Content/Parts/ExecuteCode.tsx
@@ -4,10 +4,10 @@ import type { TAttachment } from 'librechat-data-provider';
import ProgressText from '~/components/Chat/Messages/Content/ProgressText';
import FinishedIcon from '~/components/Chat/Messages/Content/FinishedIcon';
import MarkdownLite from '~/components/Chat/Messages/Content/MarkdownLite';
+import { useProgress, useLocalize } from '~/hooks';
import { CodeInProgress } from './CodeProgress';
import Attachment from './Attachment';
import LogContent from './LogContent';
-import { useProgress } from '~/hooks';
import store from '~/store';
interface ParsedArgs {
@@ -36,6 +36,9 @@ export function useParseArgs(args: string): ParsedArgs {
}, [args]);
}
+const radius = 56.08695652173913;
+const circumference = 2 * Math.PI * radius;
+
export default function ExecuteCode({
initialProgress = 0.1,
args,
@@ -49,14 +52,12 @@ export default function ExecuteCode({
isSubmitting: boolean;
attachments?: TAttachment[];
}) {
+ const localize = useLocalize();
const showAnalysisCode = useRecoilValue(store.showCode);
const [showCode, setShowCode] = useState(showAnalysisCode);
const { lang, code } = useParseArgs(args);
const progress = useProgress(initialProgress);
-
- const radius = 56.08695652173913;
- const circumference = 2 * Math.PI * radius;
const offset = circumference - progress * circumference;
return (
@@ -78,9 +79,10 @@ export default function ExecuteCode({