Simplify working directory placeholder and empty state messaging
This commit is contained in:
@@ -862,16 +862,14 @@ export function WorkingDirectoryDropdown({
|
|||||||
const handleOpen = useCallback(() => setIsOpen(true), []);
|
const handleOpen = useCallback(() => setIsOpen(true), []);
|
||||||
const handleOpenChange = useCallback((open: boolean) => setIsOpen(open), []);
|
const handleOpenChange = useCallback((open: boolean) => setIsOpen(open), []);
|
||||||
|
|
||||||
const emptyText = suggestedPaths.length > 0
|
const emptyText = "No agent directories match your search.";
|
||||||
? "No agent directories match your search."
|
|
||||||
: "We'll suggest directories from agents on this host once they exist.";
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<SelectField
|
<SelectField
|
||||||
label="WORKING DIRECTORY"
|
label="WORKING DIRECTORY"
|
||||||
value={workingDir}
|
value={workingDir}
|
||||||
placeholder="/path/to/project"
|
placeholder="Choose a working directory"
|
||||||
onPress={handleOpen}
|
onPress={handleOpen}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
errorMessage={errorMessage || undefined}
|
errorMessage={errorMessage || undefined}
|
||||||
|
|||||||
@@ -758,7 +758,7 @@ function DraftAgentScreenContent({
|
|||||||
|
|
||||||
return agentWorkingDirSuggestions.length > 0
|
return agentWorkingDirSuggestions.length > 0
|
||||||
? 'No agent directories match your search.'
|
? 'No agent directories match your search.'
|
||||||
: "We'll suggest directories from agents on this host once they exist."
|
: 'No agent directories match your search.'
|
||||||
}, [agentWorkingDirSuggestions.length, hasWorkingDirectorySearch, workingDirSearchError])
|
}, [agentWorkingDirSuggestions.length, hasWorkingDirectorySearch, workingDirSearchError])
|
||||||
const displayWorkingDir = shortenPath(workingDir)
|
const displayWorkingDir = shortenPath(workingDir)
|
||||||
const worktreeTriggerValue =
|
const worktreeTriggerValue =
|
||||||
@@ -1167,7 +1167,7 @@ function DraftAgentScreenContent({
|
|||||||
containerStyle={styles.fullSelector}
|
containerStyle={styles.fullSelector}
|
||||||
label="Working directory"
|
label="Working directory"
|
||||||
value={displayWorkingDir}
|
value={displayWorkingDir}
|
||||||
placeholder="/path/to/project"
|
placeholder="Choose a working directory"
|
||||||
onPress={() => setIsWorkingDirOpen(true)}
|
onPress={() => setIsWorkingDirOpen(true)}
|
||||||
icon={<Folder size={theme.iconSize.md} color={theme.colors.foregroundMuted} />}
|
icon={<Folder size={theme.iconSize.md} color={theme.colors.foregroundMuted} />}
|
||||||
showLabel={false}
|
showLabel={false}
|
||||||
|
|||||||
Reference in New Issue
Block a user