diff --git a/AgentCompany-New/src/renderer/src/pages/SettingsPage.tsx b/AgentCompany-New/src/renderer/src/pages/SettingsPage.tsx
index b1a66363..8081ab10 100644
--- a/AgentCompany-New/src/renderer/src/pages/SettingsPage.tsx
+++ b/AgentCompany-New/src/renderer/src/pages/SettingsPage.tsx
@@ -123,7 +123,7 @@ export function SettingsPage({ snapshot, actions }: PageProps) {
- {tab === "workspace" &&
}
+ {tab === "workspace" &&
p.orgId === orgId)} orgId={orgId} actions={actions} />}
{tab === "members" && (
{
+ const result = await window.agentCompany.pickDirectory();
+ if (result.ok && result.data) {
+ const input = form.elements.namedItem("localPath") as HTMLInputElement | null;
+ if (input) input.value = result.data;
+ }
+ };
+
+ const submit = (event: FormEvent) => {
+ event.preventDefault();
+ const form = new FormData(event.currentTarget);
+ void actions.run(() => window.agentCompany.createWorkspace({
+ orgId,
+ name: text(form, "name"),
+ localPath: text(form, "localPath"),
+ projectId: optional(form, "projectId"),
+ })).then((result) => { if (result) setCreateOpen(false); });
+ };
+
return (
Workspace
@@ -30,22 +68,42 @@ export function WorkspacePanel({
- {workspaces.length > 0 && (
-
-
Workspaces
- {workspaces.map((workspace) => (
-
-
-
{workspace.name}
-
{workspace.localPath}
-
-
- {workspace.isPrimary ?
Primary :
Secondary}
-
-
- ))}
+
+
+
Workspaces
+
- )}
+ {workspaces.map((workspace) => (
+
+
+
{workspace.name}
+
{workspace.localPath}
+
+
+ {workspace.isPrimary ?
Primary :
Secondary}
+
+
+ ))}
+ {workspaces.length === 0 &&
No workspaces configured
}
+
+
+
);
}