@neuralnomads/codenomad 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/schema.js +3 -0
- package/dist/index.js +26 -16
- package/dist/opencode-config/package.json +1 -1
- package/dist/workspaces/manager.js +10 -7
- package/package.json +1 -1
- package/public/assets/index-B6Mq3WFp.js +1 -0
- package/public/assets/index-BImu-9hB.css +1 -0
- package/public/assets/loading-Injxu_Cq.js +1 -0
- package/public/assets/main-DHjfTuXn.js +184 -0
- package/public/index.html +3 -3
- package/public/loading.html +3 -3
- package/public/ui-version.json +1 -1
- package/public/assets/index-DnHaaIEz.js +0 -1
- package/public/assets/index-jsaYAAWh.css +0 -1
- package/public/assets/loading-klAMCw12.js +0 -1
- package/public/assets/main-CGe7fqHZ.js +0 -184
package/dist/config/schema.js
CHANGED
|
@@ -10,8 +10,11 @@ const PreferencesSchema = z.object({
|
|
|
10
10
|
thinkingBlocksExpansion: z.enum(["expanded", "collapsed"]).default("expanded"),
|
|
11
11
|
showTimelineTools: z.boolean().default(true),
|
|
12
12
|
lastUsedBinary: z.string().optional(),
|
|
13
|
+
locale: z.string().optional(),
|
|
13
14
|
environmentVariables: z.record(z.string()).default({}),
|
|
14
15
|
modelRecents: z.array(ModelPreferenceSchema).default([]),
|
|
16
|
+
modelFavorites: z.array(ModelPreferenceSchema).default([]),
|
|
17
|
+
modelThinkingSelections: z.record(z.string(), z.string()).default({}),
|
|
15
18
|
diffViewMode: z.enum(["split", "unified"]).default("split"),
|
|
16
19
|
toolOutputExpansion: z.enum(["expanded", "collapsed"]).default("expanded"),
|
|
17
20
|
diagnosticsExpansion: z.enum(["expanded", "collapsed"]).default("expanded"),
|
package/dist/index.js
CHANGED
|
@@ -205,22 +205,32 @@ async function main() {
|
|
|
205
205
|
return;
|
|
206
206
|
}
|
|
207
207
|
shuttingDown = true;
|
|
208
|
-
logger.info("Received shutdown signal,
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
}
|
|
208
|
+
logger.info("Received shutdown signal, stopping workspaces and server");
|
|
209
|
+
const shutdownWorkspaces = (async () => {
|
|
210
|
+
try {
|
|
211
|
+
instanceEventBridge.shutdown();
|
|
212
|
+
}
|
|
213
|
+
catch (error) {
|
|
214
|
+
logger.warn({ err: error }, "Instance event bridge shutdown failed");
|
|
215
|
+
}
|
|
216
|
+
try {
|
|
217
|
+
await workspaceManager.shutdown();
|
|
218
|
+
logger.info("Workspace manager shutdown complete");
|
|
219
|
+
}
|
|
220
|
+
catch (error) {
|
|
221
|
+
logger.error({ err: error }, "Workspace manager shutdown failed");
|
|
222
|
+
}
|
|
223
|
+
})();
|
|
224
|
+
const shutdownHttp = (async () => {
|
|
225
|
+
try {
|
|
226
|
+
await server.stop();
|
|
227
|
+
logger.info("HTTP server stopped");
|
|
228
|
+
}
|
|
229
|
+
catch (error) {
|
|
230
|
+
logger.error({ err: error }, "Failed to stop HTTP server");
|
|
231
|
+
}
|
|
232
|
+
})();
|
|
233
|
+
await Promise.allSettled([shutdownWorkspaces, shutdownHttp]);
|
|
224
234
|
// no-op: remote UI manifest replaces GitHub release monitor
|
|
225
235
|
logger.info("Exiting process");
|
|
226
236
|
process.exit(0);
|
|
@@ -136,16 +136,19 @@ export class WorkspaceManager {
|
|
|
136
136
|
}
|
|
137
137
|
async shutdown() {
|
|
138
138
|
this.options.logger.info("Shutting down all workspaces");
|
|
139
|
+
const stopTasks = [];
|
|
139
140
|
for (const [id, workspace] of this.workspaces) {
|
|
140
|
-
if (workspace.pid) {
|
|
141
|
-
this.options.logger.info({ workspaceId: id }, "Stopping workspace during shutdown");
|
|
142
|
-
await this.runtime.stop(id).catch((error) => {
|
|
143
|
-
this.options.logger.error({ workspaceId: id, err: error }, "Failed to stop workspace during shutdown");
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
141
|
+
if (!workspace.pid) {
|
|
147
142
|
this.options.logger.debug({ workspaceId: id }, "Workspace already stopped");
|
|
143
|
+
continue;
|
|
148
144
|
}
|
|
145
|
+
this.options.logger.info({ workspaceId: id }, "Stopping workspace during shutdown");
|
|
146
|
+
stopTasks.push(this.runtime.stop(id).catch((error) => {
|
|
147
|
+
this.options.logger.error({ workspaceId: id, err: error }, "Failed to stop workspace during shutdown");
|
|
148
|
+
}));
|
|
149
|
+
}
|
|
150
|
+
if (stopTasks.length > 0) {
|
|
151
|
+
await Promise.allSettled(stopTasks);
|
|
149
152
|
}
|
|
150
153
|
this.workspaces.clear();
|
|
151
154
|
this.opencodeAuth.clear();
|