refactor: remove mobile-specific placeholder text for simplicity

- Remove isMobileWidth signal and updateMobileWidth resize listener
- Use same placeholder text for all devices/platforms
- "Type your message, @file, @agent, or paste images and text..."

Simplifies implementation per dev feedback - one approach for all
This commit is contained in:
bizzkoot
2026-01-13 06:48:33 +08:00
parent 71f58e7c5f
commit b17087b610

View File

@@ -90,31 +90,10 @@ export default function PromptInput(props: PromptInputProps) {
return `${Math.max(maxHeight, 150)}px` // Minimum 150px to be useful
})
// Responsive placeholder text - shorter on mobile to avoid overlap with expand button
const [isMobileWidth, setIsMobileWidth] = createSignal(false)
const updateMobileWidth = () => {
if (typeof window !== "undefined") {
setIsMobileWidth(window.innerWidth <= 640)
}
}
onMount(() => {
updateMobileWidth()
window.addEventListener("resize", updateMobileWidth)
onCleanup(() => {
window.removeEventListener("resize", updateMobileWidth)
})
})
const getPlaceholder = () => {
if (mode() === "shell") {
return "Run a shell command (Esc to exit)..."
}
// Use shorter placeholder on mobile to prevent overlap with expand button
if (isMobileWidth()) {
return "Type message, @file, @agent..."
}
return "Type your message, @file, @agent, or paste images and text..."
}