mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-06-05 04:15:42 +08:00
Compare commits
1 Commits
fix/chat-t
...
chore/use-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cdfd576ae7 |
@@ -5,6 +5,9 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<link rel="icon" type="image/png" href="/favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover" />
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap" rel="stylesheet" />
|
||||
<title>CloudCLI UI</title>
|
||||
|
||||
<!-- PWA Manifest -->
|
||||
|
||||
@@ -143,21 +143,6 @@ const createFakeSubmitEvent = () => {
|
||||
return { preventDefault: () => undefined } as unknown as FormEvent<HTMLFormElement>;
|
||||
};
|
||||
|
||||
const THINKING_MODE_STORAGE_KEY = 'chat-thinking-mode';
|
||||
|
||||
const getInitialThinkingMode = () => {
|
||||
if (typeof window === 'undefined') {
|
||||
return 'none';
|
||||
}
|
||||
|
||||
const savedMode = safeLocalStorage.getItem(THINKING_MODE_STORAGE_KEY);
|
||||
if (!savedMode) {
|
||||
return 'none';
|
||||
}
|
||||
|
||||
return thinkingModes.some((mode) => mode.id === savedMode) ? savedMode : 'none';
|
||||
};
|
||||
|
||||
const getNotificationSessionSummary = (
|
||||
selectedSession: ProjectSession | null,
|
||||
fallbackInput: string,
|
||||
@@ -219,7 +204,7 @@ export function useChatComposerState({
|
||||
const [uploadingImages, setUploadingImages] = useState<Map<string, number>>(new Map());
|
||||
const [imageErrors, setImageErrors] = useState<Map<string, string>>(new Map());
|
||||
const [isTextareaExpanded, setIsTextareaExpanded] = useState(false);
|
||||
const [thinkingMode, setThinkingMode] = useState(getInitialThinkingMode);
|
||||
const [thinkingMode, setThinkingMode] = useState('none');
|
||||
const [commandModalPayload, setCommandModalPayload] = useState<CommandModalPayload | null>(null);
|
||||
|
||||
const textareaRef = useRef<HTMLTextAreaElement>(null);
|
||||
@@ -579,7 +564,7 @@ export function useChatComposerState({
|
||||
|
||||
let messageContent = currentInput;
|
||||
const selectedThinkingMode = thinkingModes.find((mode: { id: string; prefix?: string }) => mode.id === thinkingMode);
|
||||
if (provider === 'claude' && selectedThinkingMode && selectedThinkingMode.prefix) {
|
||||
if (selectedThinkingMode && selectedThinkingMode.prefix) {
|
||||
messageContent = `${selectedThinkingMode.prefix}: ${currentInput}`;
|
||||
}
|
||||
|
||||
@@ -764,6 +749,7 @@ export function useChatComposerState({
|
||||
setUploadingImages(new Map());
|
||||
setImageErrors(new Map());
|
||||
setIsTextareaExpanded(false);
|
||||
setThinkingMode('none');
|
||||
|
||||
if (textareaRef.current) {
|
||||
textareaRef.current.style.height = 'auto';
|
||||
@@ -809,10 +795,6 @@ export function useChatComposerState({
|
||||
inputValueRef.current = input;
|
||||
}, [input]);
|
||||
|
||||
useEffect(() => {
|
||||
safeLocalStorage.setItem(THINKING_MODE_STORAGE_KEY, thinkingMode);
|
||||
}, [thinkingMode]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!selectedProjectId) {
|
||||
return;
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
body {
|
||||
@apply bg-background text-foreground;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user