Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,8 @@ export default function App() {
loadWorkspaceTemplates,
loadSessions,
refreshPendingPermissions,
selectedSessionId,
selectSession,
setSelectedSessionId,
setMessages,
setTodos,
Expand Down
20 changes: 17 additions & 3 deletions src/app/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ export function createWorkspaceStore(options: {
loadWorkspaceTemplates: (options?: { workspaceRoot?: string; quiet?: boolean }) => Promise<void>;
loadSessions: (scopeRoot?: string) => Promise<void>;
refreshPendingPermissions: () => Promise<void>;
selectedSessionId: () => string | null;
selectSession: (id: string) => Promise<void>;
setSelectedSessionId: (value: string | null) => void;
setMessages: (value: any[]) => void;
setTodos: (value: any[]) => void;
Expand Down Expand Up @@ -261,7 +263,7 @@ export function createWorkspaceStore(options: {
{
type: "text",
text:
"Load the `workspace_guide` skill from this workspace and explain, in plain language, what lives in this folder (skills/plugins/templates) and whats global. Then suggest 2 quick next actions the user can do in OpenWork.",
"Load the `workspace_guide` skill from this workspace and give a short, welcoming overview of what lives here (skills, plugins, templates) versus what's global. Avoid CLI language or raw file paths. Then suggest two friendly next actions to try inside OpenWork.",
},
],
});
Expand All @@ -273,15 +275,27 @@ export function createWorkspaceStore(options: {
}

await options.loadSessions(activeWorkspaceRoot().trim()).catch(() => undefined);

if (session?.id) {
try {
await options.selectSession(session.id);
options.setView("session");
options.setTab("sessions");
} catch {
// ignore selection failure
}
}
}
}
} catch {
// ignore onboarding session failures
}

options.refreshSkills().catch(() => undefined);
options.setView("dashboard");
options.setTab("home");
if (!options.selectedSessionId()) {
options.setView("dashboard");
options.setTab("home");
}
return true;
} catch (e) {
options.setClient(null);
Expand Down