@kafca/agentdock 0.1.7 → 0.1.8

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.
@@ -5,7 +5,7 @@
5
5
  <link rel="icon" type="image/svg+xml" href="./favicon.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>AgentDock</title>
8
- <script type="module" crossorigin src="./assets/index-BaNpzC6d.js"></script>
8
+ <script type="module" crossorigin src="./assets/index-oT33r-V6.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="./assets/index-CLWJyO0E.css">
10
10
  </head>
11
11
  <body class="bg-[#f5f5f7] dark:bg-[#151516]">
@@ -55,14 +55,27 @@ class LocalCoreController extends node_events_1.EventEmitter {
55
55
  status: 'running',
56
56
  startedAt: new Date().toISOString(),
57
57
  };
58
+ const configFile = await this.readConfigFile();
59
+ const settings = this.state.getSettings();
60
+ const workspaceIds = Array.isArray(configFile.parsed?.projects)
61
+ ? configFile.parsed.projects
62
+ .map((project) => String(project?.name || '').trim())
63
+ .filter(Boolean)
64
+ : [];
65
+ const defaultProject = workspaceIds.includes(settings.defaultProject)
66
+ ? settings.defaultProject
67
+ : workspaceIds[0] || '';
58
68
  return {
59
69
  mode: 'desktop',
60
70
  phase: 'api_ready',
61
71
  pendingRestart: false,
62
72
  service,
63
73
  roles: (0, desktop_js_1.deriveDesktopRuntimeRoles)(service),
64
- settings: this.state.getSettings(),
65
- configFile: await this.readConfigFile(),
74
+ settings: {
75
+ ...settings,
76
+ defaultProject,
77
+ },
78
+ configFile,
66
79
  logs: this.getLogs(200),
67
80
  pluginDiagnostics: await this.getPluginDiagnostics(),
68
81
  };
@@ -38,11 +38,7 @@ const node_fs_1 = require("node:fs");
38
38
  const node_path_1 = require("node:path");
39
39
  const TOML = __importStar(require("@iarna/toml"));
40
40
  const DEFAULT_CONFIG = `# Managed by Local AI Core
41
- [[projects]]
42
- name = "default"
43
-
44
- [projects.agent]
45
- type = "opencode"
41
+ # Add [[projects]] entries from the workspace page before starting a conversation.
46
42
  `;
47
43
  const LOG_FILE_NAME = 'local-core.log';
48
44
  const LOG_FILE_MAX_BYTES = 2 * 1024 * 1024;
@@ -72,7 +68,7 @@ class FileBackedLocalCoreRuntimeState {
72
68
  async saveSettings(input) {
73
69
  this.settings = {
74
70
  ...this.settings,
75
- ...(input.defaultProject ? { defaultProject: input.defaultProject } : {}),
71
+ ...(input.defaultProject !== undefined ? { defaultProject: input.defaultProject } : {}),
76
72
  ...(typeof input.autoStartService === 'boolean' ? { autoStartService: input.autoStartService } : {}),
77
73
  ...(input.configPath ? { configPath: input.configPath } : {}),
78
74
  plugins: input.plugins
@@ -180,7 +176,7 @@ class FileBackedLocalCoreRuntimeState {
180
176
  loadSettings() {
181
177
  const defaults = {
182
178
  configPath: (0, node_path_1.join)(this.runtimeDir, 'config.toml'),
183
- defaultProject: 'default',
179
+ defaultProject: '',
184
180
  autoStartService: true,
185
181
  plugins: {},
186
182
  knowledge: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kafca/agentdock",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "type": "module",
5
5
  "main": "dist-electron/electron/main.js",
6
6
  "bin": {