Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Haze <hazeone@users.noreply.github.com>
This commit is contained in:
@@ -581,16 +581,12 @@ function AddChannelDialog({ selectedType, onSelectType, onClose, onChannelAdded
|
||||
|
||||
toast.success(t('toast.channelSaved', { name: meta.name }));
|
||||
|
||||
// Step 4: Restart the Gateway so it picks up the new channel config
|
||||
// The Gateway watches the config file, but a restart ensures a clean start
|
||||
// especially when adding a channel for the first time.
|
||||
try {
|
||||
await window.electron.ipcRenderer.invoke('gateway:restart');
|
||||
toast.success(t('toast.channelConnecting', { name: meta.name }));
|
||||
} catch (restartError) {
|
||||
console.warn('Gateway restart after channel config:', restartError);
|
||||
toast.info(t('toast.restartManual'));
|
||||
}
|
||||
// Gateway restart is now handled server-side via debouncedRestart()
|
||||
// inside the channel:saveConfig IPC handler, so we don't need to
|
||||
// trigger it explicitly here. This avoids cascading restarts when
|
||||
// multiple config changes happen in quick succession (e.g. during
|
||||
// the setup wizard).
|
||||
toast.success(t('toast.channelConnecting', { name: meta.name }));
|
||||
|
||||
// Brief delay so user can see the success state before dialog closes
|
||||
await new Promise((resolve) => setTimeout(resolve, 800));
|
||||
|
||||
Reference in New Issue
Block a user