mirror of
https://github.com/aaif-goose/goose.git
synced 2026-06-02 06:14:27 +02:00
fix(desktop): start new chat in current window from recipe param modal (#9422)
Signed-off-by: Michael Neale <micn@block.xyz>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Parameter } from '../recipe';
|
||||
import { Button } from './ui/button';
|
||||
import { getInitialWorkingDir } from '../utils/workingDir';
|
||||
import { defineMessages, useIntl } from '../i18n';
|
||||
|
||||
const i18n = defineMessages({
|
||||
@@ -126,14 +125,7 @@ const ParameterInputModal: React.FC<ParameterInputModalProps> = ({
|
||||
|
||||
const handleCancelOption = (option: 'new-chat' | 'back-to-form'): void => {
|
||||
if (option === 'new-chat') {
|
||||
try {
|
||||
const workingDir = getInitialWorkingDir();
|
||||
window.electron.createChatWindow({ dir: workingDir });
|
||||
window.electron.hideWindow();
|
||||
} catch (error) {
|
||||
console.error('Error creating new window:', error);
|
||||
onClose();
|
||||
}
|
||||
} else {
|
||||
setShowCancelOptions(false); // Go back to the parameter form
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user