Prepare datamodel for multi-environment (#1765)

Co-authored-by: justsomelegs <[email protected]>
Co-authored-by: codex <[email protected]>
Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: cursor[bot] <206951365+cursor[bot]@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-04-09 02:05:20 +00:00
1 parent 72b7f90c50
commit b96308fc5a
121 files changed
+10195 -4958

No files matched your search

+18
View File
@@ -1,5 +1,6 @@
import {
DEFAULT_SERVER_SETTINGS,
EnvironmentId,
ProjectId,
ThreadId,
type ServerConfig,
@@ -50,7 +51,21 @@ const defaultProviders: ReadonlyArray<ServerProvider> = [
},
];
const baseEnvironment = {
environmentId: EnvironmentId.makeUnsafe("environment-local"),
label: "Local environment",
platform: {
os: "darwin" as const,
arch: "arm64" as const,
},
serverVersion: "0.0.0-test",
capabilities: {
repositoryIdentity: true,
},
};
const baseServerConfig: ServerConfig = {
environment: baseEnvironment,
cwd: "/tmp/workspace",
keybindingsConfigPath: "/tmp/workspace/.config/keybindings.json",
keybindings: [],
@@ -193,6 +208,7 @@ describe("serverState", () => {
sequence: 1,
type: "welcome",
payload: {
environment: baseEnvironment,
cwd: "/tmp/workspace",
projectName: "t3-code",
bootstrapProjectId: ProjectId.makeUnsafe("project-1"),
@@ -201,6 +217,7 @@ describe("serverState", () => {
});
expect(listener).toHaveBeenCalledWith({
environment: baseEnvironment,
cwd: "/tmp/workspace",
projectName: "t3-code",
bootstrapProjectId: ProjectId.makeUnsafe("project-1"),
@@ -210,6 +227,7 @@ describe("serverState", () => {
const lateListener = vi.fn();
const unsubscribeLate = onWelcome(lateListener);
expect(lateListener).toHaveBeenCalledWith({
environment: baseEnvironment,
cwd: "/tmp/workspace",
projectName: "t3-code",
bootstrapProjectId: ProjectId.makeUnsafe("project-1"),