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
12 changes: 6 additions & 6 deletions apps/server/src/lazurio/managedFolder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,34 @@ export function managedFolderRefusal(
): string | null {
if (folder === undefined) return null;
const message =
"Start a new chat in the Lazurio project. This Environment starts agents in its Lazurio Folder; existing conversations remain available as history.";
"Start a new chat in the Lazurio project. Agents in this Environment work in its Lazurio Folder; your earlier chats stay here as history.";
const project = (id: string) => state.projects.find((item) => item.id === id);
const allowedProject = (id: string) => project(id)?.workspaceRoot === folder;
switch (command.type) {
case "project.create":
return command.workspaceRoot === folder
? null
: "This Environment provides the Lazurio project at its Folder root.";
: "In this Environment, the Lazurio project is the Lazurio Folder itself.";
case "project.meta.update":
if (
allowedProject(command.projectId) &&
command.title !== undefined &&
command.title !== "Lazurio"
)
return "The managed project is named Lazurio.";
return "This project keeps the name Lazurio.";
return command.workspaceRoot !== undefined &&
command.workspaceRoot !== project(command.projectId)?.workspaceRoot
? "A managed Environment does not retarget projects. Use the Lazurio project."
? "In this Environment a project cannot point to another folder. Use the Lazurio project."
: null;
case "project.delete":
return allowedProject(command.projectId)
? "The Lazurio project is provided by this Environment and cannot be removed."
? "The Lazurio project belongs to this Environment and cannot be removed."
: null;
case "thread.create":
return allowedProject(command.projectId) && command.worktreePath === null ? null : message;
case "thread.meta.update":
return command.worktreePath != null
? "Chats in this Environment start at the Lazurio Folder root, without a T3 worktree."
? "Chats in this Environment start in the Lazurio Folder, without a separate worktree."
: null;
case "thread.turn.start": {
const thread = state.threads.find((item) => item.id === command.threadId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ describe("OrchestrationEngine", () => {
projectId: id,
workspaceRoot: "/tmp/other",
}),
).rejects.toThrow("retarget");
).rejects.toThrow("cannot point to another folder");
await expect(
dispatch({ type: "project.delete", commandId: CommandId.make("delete"), projectId: id }),
).rejects.toThrow("cannot be removed");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ const make = Effect.gen(function* () {
provider: preferredProvider,
method: "thread.turn.start",
detail:
"This Environment starts agents in its Lazurio Folder. Start a new chat in the Lazurio project.",
"Agents in this Environment work in its Lazurio Folder. Start a new chat in the Lazurio project.",
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/vcs/VcsProvisioningService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const make = Effect.gen(function* () {
operation: "VcsProvisioningService.initRepository",
kind: input.kind ?? "git",
detail:
"The Lazurio Folder contains separate repositories and must not become a repository itself.",
"The Lazurio Folder holds separate repositories, so it cannot become a repository itself.",
});
}
const kind = yield* resolveRequestedKind(input.kind);
Expand Down
Loading