From e5d2d984b6f753b48dcde8642b0658f992b4c0dd Mon Sep 17 00:00:00 2001 From: David Hill Date: Sat, 24 Jan 2026 18:08:40 +0000 Subject: [PATCH] feat(app): change prompt placeholder based on comment count --- packages/app/src/components/prompt-input.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/app/src/components/prompt-input.tsx b/packages/app/src/components/prompt-input.tsx index c6f390fb7..3eddbb303 100644 --- a/packages/app/src/components/prompt-input.tsx +++ b/packages/app/src/components/prompt-input.tsx @@ -123,6 +123,7 @@ export const PromptInput: Component = (props) => { const local = useLocal() const files = useFile() const prompt = usePrompt() + const commentCount = createMemo(() => prompt.context.items().filter((item) => !!item.comment?.trim()).length) const layout = useLayout() const comments = useComments() const params = useParams() @@ -1827,7 +1828,11 @@ export const PromptInput: Component = (props) => { aria-label={ store.mode === "shell" ? language.t("prompt.placeholder.shell") - : language.t("prompt.placeholder.normal", { example: language.t(EXAMPLES[store.placeholder]) }) + : commentCount() > 1 + ? "Summarize comments…" + : commentCount() === 1 + ? "Summarize comment…" + : language.t("prompt.placeholder.normal", { example: language.t(EXAMPLES[store.placeholder]) }) } contenteditable="true" onInput={handleInput} @@ -1847,7 +1852,11 @@ export const PromptInput: Component = (props) => {
{store.mode === "shell" ? language.t("prompt.placeholder.shell") - : language.t("prompt.placeholder.normal", { example: language.t(EXAMPLES[store.placeholder]) })} + : commentCount() > 1 + ? "Summarize comments…" + : commentCount() === 1 + ? "Summarize comment…" + : language.t("prompt.placeholder.normal", { example: language.t(EXAMPLES[store.placeholder]) })}