Create / edit recipe form unification and improvements (#4693)

This commit is contained in:
Zane
2025-10-05 09:00:59 -07:00
committed by GitHub
parent ebb3888ff1
commit f4d79404ee
55 changed files with 4486 additions and 3074 deletions
+1 -24
View File
@@ -489,7 +489,6 @@ let appConfig = {
};
const windowMap = new Map<number, BrowserWindow>();
const goosedClients = new Map<number, Client>();
// Track power save blockers per window
@@ -511,28 +510,7 @@ const createChat = async (
let workingDir = '';
let goosedProcess: import('child_process').ChildProcess | null = null;
if (viewType === 'recipeEditor') {
// For recipeEditor, get the port from existing windows' config
const existingWindows = BrowserWindow.getAllWindows();
if (existingWindows.length > 0) {
// Get the config from localStorage through an existing window
try {
const config = await existingWindows[0].webContents.executeJavaScript(
`window.electron.getConfig()`
);
if (config) {
port = config.GOOSE_PORT;
workingDir = config.GOOSE_WORKING_DIR;
}
} catch (e) {
console.error('Failed to get config from localStorage:', e);
}
}
if (port === 0) {
console.error('No existing Goose process found for recipeEditor');
throw new Error('Cannot create recipeEditor window: No existing Goose process found');
}
} else {
{
// Apply current environment settings before creating chat
updateEnvironmentVariables(envToggles);
@@ -688,7 +666,6 @@ const createChat = async (
permission: '/permission',
ConfigureProviders: '/configure-providers',
sharedSession: '/shared-session',
recipeEditor: '/recipe-editor',
welcome: '/welcome',
};