Skip to content

Commit 0cbfbe7

Browse files
refactor(web): centralize disconnected composer copy
Co-authored-by: maria <[email protected]>
1 parent 8fdf6df commit 0cbfbe7

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎apps/web/src/components/chat/ChatComposer.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import {
4242
replaceTextRange,
4343
shouldSubmitComposerOnEnter,
4444
} from "../../composer-logic";
45+
import { DISCONNECTED_COMPOSER_PLACEHOLDER } from "../../composerPlaceholder";
4546
import { deriveComposerSendState, readFileAsDataUrl } from "../ChatView.logic";
4647
import {
4748
dataTransferHasComposerMention,
@@ -3075,7 +3076,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
30753076
: noProviderAvailable
30763077
? "Enable a provider in Settings to send a message"
30773078
: phase === "disconnected"
3078-
? "Ask for changes, send follow-ups, or attach images"
3079+
? DISCONNECTED_COMPOSER_PLACEHOLDER
30793080
: "Ask anything, @tag files/folders, $use skills, or / for commands"
30803081
}
30813082
disabled={isConnecting || isComposerApprovalState || projectSelectionRequired}

‎apps/web/src/components/settings/SettingsFontPreviews.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useCallback, useEffect, useRef, useState } from "react";
33
import { ComposerPromptEditor, type ComposerPromptEditorHandle } from "../ComposerPromptEditor";
44
import { terminalThemeFromApp } from "../ThreadTerminalDrawer";
55
import { useTheme } from "../../hooks/useTheme";
6+
import { DISCONNECTED_COMPOSER_PLACEHOLDER } from "../../composerPlaceholder";
67
import { resolveDiffThemeName, type DiffThemeName } from "../../lib/diffRendering";
78
import { GhosttyTerminalSurface } from "~/terminal/ghostty/surface";
89

@@ -43,7 +44,7 @@ export function PromptFontPreview() {
4344
terminalContexts={EMPTY_TERMINAL_CONTEXTS}
4445
skills={EMPTY_SKILLS}
4546
disabled={false}
46-
placeholder="Ask for changes, send follow-ups, or attach images"
47+
placeholder={DISCONNECTED_COMPOSER_PLACEHOLDER}
4748
className="max-h-40 min-h-12"
4849
onRemoveTerminalContext={noop}
4950
onChange={onChange}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export const DISCONNECTED_COMPOSER_PLACEHOLDER =
2+
"Ask for changes, send follow-ups, or attach images";

0 commit comments

Comments
 (0)