summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdam <[email protected]>2025-12-09 16:09:19 -0600
committerAdam <[email protected]>2025-12-09 16:23:05 -0600
commit44c17c14357f42ac5fb6c7ab7aebc0ebe81ca5d5 (patch)
treeaf2bedcb2b0832c8d645bc2a0135732e0a4fdbc1
parent132e772c2605cadaccce56080154f33f01462e89 (diff)
downloadopencode-44c17c14357f42ac5fb6c7ab7aebc0ebe81ca5d5.tar.gz
opencode-44c17c14357f42ac5fb6c7ab7aebc0ebe81ca5d5.zip
wip(desktop): progress
-rw-r--r--packages/desktop/src/components/prompt-input.tsx15
1 files 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<PromptInputProps> = (props) => {
const navigate = useNavigate()
const sdk = useSDK()
@@ -36,6 +38,15 @@ export const PromptInput: Component<PromptInputProps> = (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<PromptInputProps> = (props) => {
/>
<Show when={!session.prompt.dirty()}>
<div class="absolute top-0 left-0 px-5 py-3 text-14-regular text-text-weak pointer-events-none">
- Plan and build anything
+ Ask anything... "{PLACEHOLDERS[placeholder()]}"
</div>
</Show>
</div>