The open source coding agent.
TypeScript
feat(app): change prompt placeholder based on comment count
David Hille5d2d984b6f7
diff --git a/packages/app/src/components/prompt-input.tsx b/packages/app/src/components/prompt-input.tsxindex c6f390fb7e6..3eddbb303eb 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<PromptInputProps> = (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<PromptInputProps> = (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<PromptInputProps> = (props) => {<div class="absolute top-0 inset-x-0 p-3 pr-12 text-14-regular text-text-weak pointer-events-none whitespace-nowrap truncate">{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]) })}</div></Show></div>