feat: project workspace clear/update UX and creation docs

Add granular workspace management — clear local folder or repo URL
independently instead of deleting the whole workspace. Fix project
create route typing. Document inline workspace creation in API docs
and skill references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dotta
2026-03-02 14:21:03 -06:00
parent f54f30cb90
commit ff472af343
5 changed files with 135 additions and 20 deletions

View File

@@ -35,9 +35,11 @@ export function projectRoutes(db: Db) {
router.post("/companies/:companyId/projects", validate(createProjectSchema), async (req, res) => {
const companyId = req.params.companyId as string;
assertCompanyAccess(req, companyId);
const { workspace, ...projectData } = req.body as Record<string, unknown> & {
workspace?: Record<string, unknown>;
type CreateProjectPayload = Parameters<typeof svc.create>[1] & {
workspace?: Parameters<typeof svc.createWorkspace>[1];
};
const { workspace, ...projectData } = req.body as CreateProjectPayload;
const project = await svc.create(companyId, projectData);
let createdWorkspaceId: string | null = null;
if (workspace) {