From 44c17c14357f42ac5fb6c7ab7aebc0ebe81ca5d5 Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Tue, 9 Dec 2025 16:09:19 -0600 Subject: [PATCH] wip(desktop): progress --- packages/desktop/src/components/prompt-input.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/desktop/src/components/prompt-input.tsx b/packages/desktop/src/components/prompt-input.tsx index 32b032ea2..40bf96ae5 100644 --- a/packages/desktop/src/components/prompt-input.tsx +++ b/packages/desktop/src/components/prompt-input.tsx @@ -1,5 +1,5 @@ import { useFilteredList } from "@opencode-ai/ui/hooks" -import { createEffect, on, Component, Show, For, onMount, onCleanup, Switch, Match } from "solid-js" +import { createEffect, on, Component, Show, For, onMount, onCleanup, Switch, Match, createSignal } from "solid-js" import { createStore } from "solid-js/store" import { createFocusSignal } from "@solid-primitives/active-element" import { useLocal } from "@/context/local" @@ -22,6 +22,8 @@ interface PromptInputProps { ref?: (el: HTMLDivElement) => void } +const PLACEHOLDERS = ["Fix a TODO in the codebase", "What is the tech stack of this project?", "Fix broken tests"] + export const PromptInput: Component = (props) => { const navigate = useNavigate() const sdk = useSDK() @@ -36,6 +38,15 @@ export const PromptInput: Component = (props) => { popoverIsOpen: false, }) + const [placeholder, setPlaceholder] = createSignal(Math.floor(Math.random() * PLACEHOLDERS.length)) + + onMount(() => { + const interval = setInterval(() => { + setPlaceholder((prev) => (prev + 1) % PLACEHOLDERS.length) + }, 5000) + onCleanup(() => clearInterval(interval)) + }) + createEffect(() => { session.id editorRef.focus() @@ -403,7 +414,7 @@ export const PromptInput: Component = (props) => { />
- Plan and build anything + Ask anything... "{PLACEHOLDERS[placeholder()]}"