fix(web): improve disconnected composer placeholder (#7122)
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com> Co-authored-by: maria <[email protected]>
This commit is contained in:
3 files changed
+6
-2
No files matched your search
@@ -42,6 +42,7 @@ import {
|
||||
replaceTextRange,
|
||||
shouldSubmitComposerOnEnter,
|
||||
} from "../../composer-logic";
|
||||
import { DISCONNECTED_COMPOSER_PLACEHOLDER } from "../../composerPlaceholder";
|
||||
import { deriveComposerSendState, readFileAsDataUrl } from "../ChatView.logic";
|
||||
import {
|
||||
dataTransferHasComposerMention,
|
||||
@@ -3075,7 +3076,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
|
||||
: noProviderAvailable
|
||||
? "Enable a provider in Settings to send a message"
|
||||
: phase === "disconnected"
|
||||
? "Ask for follow-up changes or attach images"
|
||||
? DISCONNECTED_COMPOSER_PLACEHOLDER
|
||||
: "Ask anything, @tag files/folders, $use skills, or / for commands"
|
||||
}
|
||||
disabled={isConnecting || isComposerApprovalState || projectSelectionRequired}
|
||||
|
||||
@@ -3,6 +3,7 @@ import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { ComposerPromptEditor, type ComposerPromptEditorHandle } from "../ComposerPromptEditor";
|
||||
import { terminalThemeFromApp } from "../ThreadTerminalDrawer";
|
||||
import { useTheme } from "../../hooks/useTheme";
|
||||
import { DISCONNECTED_COMPOSER_PLACEHOLDER } from "../../composerPlaceholder";
|
||||
import { resolveDiffThemeName, type DiffThemeName } from "../../lib/diffRendering";
|
||||
import { GhosttyTerminalSurface } from "~/terminal/ghostty/surface";
|
||||
|
||||
@@ -43,7 +44,7 @@ export function PromptFontPreview() {
|
||||
terminalContexts={EMPTY_TERMINAL_CONTEXTS}
|
||||
skills={EMPTY_SKILLS}
|
||||
disabled={false}
|
||||
placeholder="Ask for follow-up changes or attach images"
|
||||
placeholder={DISCONNECTED_COMPOSER_PLACEHOLDER}
|
||||
className="max-h-40 min-h-12"
|
||||
onRemoveTerminalContext={noop}
|
||||
onChange={onChange}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
export const DISCONNECTED_COMPOSER_PLACEHOLDER =
|
||||
"Ask for changes, send follow-ups, or attach images";
|
||||
Reference in new issue
Block a user