mirror of
https://github.com/aljazceru/goose.git
synced 2026-01-03 14:34:26 +01:00
fix: append the attachment path to the existing text in the input prompt (#1842)
This commit is contained in:
@@ -144,7 +144,11 @@ export default function Input({
|
||||
const handleFileSelect = async () => {
|
||||
const path = await window.electron.selectFileOrDirectory();
|
||||
if (path) {
|
||||
setValue(path);
|
||||
// Append the path to existing text, with a space if there's existing text
|
||||
setValue((prev) => {
|
||||
const currentText = prev.trim();
|
||||
return currentText ? `${currentText} ${path}` : path;
|
||||
});
|
||||
textAreaRef.current?.focus();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user