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:
@@ -90,31 +90,10 @@ export default function PromptInput(props: PromptInputProps) {
|
|||||||
return `${Math.max(maxHeight, 150)}px` // Minimum 150px to be useful
|
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 = () => {
|
const getPlaceholder = () => {
|
||||||
if (mode() === "shell") {
|
if (mode() === "shell") {
|
||||||
return "Run a shell command (Esc to exit)..."
|
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..."
|
return "Type your message, @file, @agent, or paste images and text..."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user