Enha: shell mode in filepickerdir

This commit is contained in:
Grail Finder
2026-02-26 20:10:00 +03:00
parent 7d51c5d0f3
commit 09b5e0d08f
2 changed files with 2 additions and 0 deletions

View File

@@ -474,6 +474,7 @@ func executeCommandAndDisplay(cmdText string) {
}
// Create the command execution
cmd := exec.Command(command, args...)
cmd.Dir = cfg.FilePickerDir
// Execute the command and get output
output, err := cmd.CombinedOutput()
// Add the command being executed to the chat

View File

@@ -714,6 +714,7 @@ func executeCommand(args map[string]string) []byte {
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
cmd := exec.CommandContext(ctx, command, cmdArgs...)
cmd.Dir = cfg.FilePickerDir
output, err := cmd.CombinedOutput()
if err != nil {
msg := fmt.Sprintf("command '%s' failed; error: %v; output: %s", command, err, string(output))