Skip to content

Commit e55ff46

Browse files
committed
fix(ui): show placeholder for empty Hermes history_path field
Reviewer flagged the field rendering as visually empty on macOS/Linux after 80ae5e3 cleared its hardcoded `~/.hermes/sessions` default — reads as "config is missing" even though the backend correctly auto-resolves via tools::hermes::hermes_home(). Add a `placeholder` prop to the Field component and pass `<HERMES_HOME>/sessions` for the hermes row. The angle-bracket env-var syntax signals "this is a placeholder hint, not literal text" to the power users who reach this modal — matches the existing technical register of the form's labels (Launch command / Extra args / etc.) and avoids adding an i18n string across 11 locales for a hint that's already unambiguous.
1 parent d1e9452 commit e55ff46

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src-ui/src/components/center/ToolConfigModal.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ export function ToolConfigModal({ toolKey, toolLabel, onClose }: Props) {
164164
label={t('tool_config.history_path' as any)}
165165
value={entry.history_path}
166166
onChange={v => setEntry({ ...entry, history_path: v })}
167+
placeholder={toolKey === 'hermes' ? '<HERMES_HOME>/sessions' : undefined}
167168
/>
168169
)}
169170
</div>
@@ -186,13 +187,14 @@ export function ToolConfigModal({ toolKey, toolLabel, onClose }: Props) {
186187
}
187188

188189
function Field({
189-
label, value, onChange, multiline, rows,
190+
label, value, onChange, multiline, rows, placeholder,
190191
}: {
191192
label: string;
192193
value: string;
193194
onChange: (v: string) => void;
194195
multiline?: boolean;
195196
rows?: number;
197+
placeholder?: string;
196198
}) {
197199
return (
198200
<label className="tool-config-field">
@@ -203,6 +205,7 @@ function Field({
203205
onChange={e => onChange(e.target.value)}
204206
rows={rows ?? 3}
205207
spellCheck={false}
208+
placeholder={placeholder}
206209
className="tool-config-input"
207210
/>
208211
) : (
@@ -211,6 +214,7 @@ function Field({
211214
value={value}
212215
onChange={e => onChange(e.target.value)}
213216
spellCheck={false}
217+
placeholder={placeholder}
214218
className="tool-config-input"
215219
/>
216220
)}

0 commit comments

Comments
 (0)