GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — keybindings · TheReal-Flo/t3code@734ab39

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps
    • desktop
      • scripts
        • dev-electron.mjs
        • electron-launcher.mjs
      • src
        • main.ts
    • server
      • integration
        • fixtures
          • providerRuntime.ts
        • orchestrationEngine.integration.test.ts
        • providerService.integration.test.ts
      • src
        • checkpointing
          • Diffs.ts
        • codexAppServerManager.ts
        • config.ts
        • keybindings.test.ts
        • keybindings.ts
        • main.ts
        • open.test.ts
        • orchestration
          • Layers
            • CheckpointReactor.test.ts
            • CheckpointReactor.ts
            • OrchestrationReactor.ts
            • ProjectionPipeline.test.ts
            • ProjectionPipeline.ts
            • ProjectionSnapshotQuery.test.ts
            • ProjectionSnapshotQuery.ts
            • ProviderCommandReactor.test.ts
            • ProviderCommandReactor.ts
            • ProviderRuntimeIngestion.ts
          • Schemas.ts
          • Services
            • ProjectionPipeline.ts
          • commandInvariants.ts
          • decider.ts
          • projector.test.ts
          • projector.ts
        • persistence/Layers
          • OrchestrationEventStore.ts
          • ProjectionCheckpoints.ts
          • ProjectionThreadActivities.ts
          • ProviderSessions.ts
        • provider
          • Layers
            • ProviderService.test.ts
            • ProviderSessionDirectory.test.ts
          • Services
            • ProviderSessionDirectory.ts
        • serverLayers.ts
        • workspaceEntries.chunking.test.ts
        • workspaceEntries.test.ts
        • wsServer.test.ts
        • wsServer.ts
    • web/src
      • components
        • BranchToolbar.tsx
        • ChatView.tsx
        • DiffPanel.tsx
        • DiffWorkerPoolProvider.tsx
        • ThreadTerminalDrawer.tsx
        • ui
          • collapsible.tsx
          • sidebar.tsx
      • keybindings.test.ts
      • lib
        • providerReactQuery.test.ts
      • markdown-links.test.ts
      • markdown-links.ts
      • projectScripts.ts
      • routeTree.gen.ts
      • session-logic.ts
      • vscode-icons-language-associations.json
      • vscode-icons-manifest.json
  • bun.lock
  • packages/contracts
    • package.json
    • src
      • keybindings.test.ts
      • keybindings.ts
      • providerRuntime.ts
      • terminal.ts
      • ws.ts
  • scripts
    • build-desktop-dmg.mjs

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/desktop/scripts/dev-electron.mjs‎

Copy file name to clipboardExpand all lines: apps/desktop/scripts/dev-electron.mjs
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,7 @@ async function shutdown(exitCode) {
4646
shuttingDown = true;
4747

4848
try {
49-
await Promise.race([
50-
monitor.destroy(),
51-
new Promise((resolve) => setTimeout(resolve, 1_500)),
52-
]);
49+
await Promise.race([monitor.destroy(), new Promise((resolve) => setTimeout(resolve, 1_500))]);
5350
} catch {
5451
// Best effort only; fallback process kill below handles stubborn children.
5552
}
Collapse file

‎apps/desktop/scripts/electron-launcher.mjs‎

Copy file name to clipboardExpand all lines: apps/desktop/scripts/electron-launcher.mjs
+12-41Lines changed: 12 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -25,34 +25,22 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
2525
export const desktopDir = resolve(__dirname, "..");
2626

2727
function setPlistString(plistPath, key, value) {
28-
const replaceResult = spawnSync(
29-
"plutil",
30-
["-replace", key, "-string", value, plistPath],
31-
{
32-
encoding: "utf8",
33-
},
34-
);
28+
const replaceResult = spawnSync("plutil", ["-replace", key, "-string", value, plistPath], {
29+
encoding: "utf8",
30+
});
3531
if (replaceResult.status === 0) {
3632
return;
3733
}
3834

39-
const insertResult = spawnSync(
40-
"plutil",
41-
["-insert", key, "-string", value, plistPath],
42-
{
43-
encoding: "utf8",
44-
},
45-
);
35+
const insertResult = spawnSync("plutil", ["-insert", key, "-string", value, plistPath], {
36+
encoding: "utf8",
37+
});
4638
if (insertResult.status === 0) {
4739
return;
4840
}
4941

50-
const details = [replaceResult.stderr, insertResult.stderr]
51-
.filter(Boolean)
52-
.join("\n");
53-
throw new Error(
54-
`Failed to update plist key "${key}" at ${plistPath}: ${details}`.trim(),
55-
);
42+
const details = [replaceResult.stderr, insertResult.stderr].filter(Boolean).join("\n");
43+
throw new Error(`Failed to update plist key "${key}" at ${plistPath}: ${details}`.trim());
5644
}
5745

5846
function patchMainBundleInfoPlist(appBundlePath, iconPath) {
@@ -81,28 +69,16 @@ function patchHelperBundleInfoPlists(appBundlePath) {
8169
continue;
8270
}
8371

84-
const helperPlistPath = join(
85-
frameworksDir,
86-
entry.name,
87-
"Contents",
88-
"Info.plist",
89-
);
72+
const helperPlistPath = join(frameworksDir, entry.name, "Contents", "Info.plist");
9073
if (!existsSync(helperPlistPath)) {
9174
continue;
9275
}
9376

94-
const suffix = entry.name
95-
.replace("Electron Helper", "")
96-
.replace(".app", "")
97-
.trim();
77+
const suffix = entry.name.replace("Electron Helper", "").replace(".app", "").trim();
9878
const helperName = suffix
9979
? `${APP_DISPLAY_NAME} Helper ${suffix}`
10080
: `${APP_DISPLAY_NAME} Helper`;
101-
const helperIdSuffix = suffix
102-
.replace(/[()]/g, "")
103-
.trim()
104-
.toLowerCase()
105-
.replace(/\s+/g, "-");
81+
const helperIdSuffix = suffix.replace(/[()]/g, "").trim().toLowerCase().replace(/\s+/g, "-");
10682
const helperBundleId = helperIdSuffix
10783
? `${APP_BUNDLE_ID}.helper.${helperIdSuffix}`
10884
: `${APP_BUNDLE_ID}.helper`;
@@ -125,12 +101,7 @@ function buildMacLauncher(electronBinaryPath) {
125101
const sourceAppBundlePath = resolve(electronBinaryPath, "../../..");
126102
const runtimeDir = join(desktopDir, ".electron-runtime");
127103
const targetAppBundlePath = join(runtimeDir, `${APP_DISPLAY_NAME}.app`);
128-
const targetBinaryPath = join(
129-
targetAppBundlePath,
130-
"Contents",
131-
"MacOS",
132-
"Electron",
133-
);
104+
const targetBinaryPath = join(targetAppBundlePath, "Contents", "MacOS", "Electron");
134105
const iconPath = join(desktopDir, "resources", "icon.icns");
135106
const metadataPath = join(runtimeDir, "metadata.json");
136107

Collapse file

‎apps/desktop/src/main.ts‎

Copy file name to clipboardExpand all lines: apps/desktop/src/main.ts
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ function registerDesktopProtocol(): void {
126126

127127
const staticRoot = resolveDesktopStaticDir();
128128
if (!staticRoot) {
129-
throw new Error("Desktop static bundle missing. Build apps/server (with bundled client) first.");
129+
throw new Error(
130+
"Desktop static bundle missing. Build apps/server (with bundled client) first.",
131+
);
130132
}
131133

132134
const staticRootResolved = path.resolve(staticRoot);
@@ -160,7 +162,8 @@ function registerDesktopProtocol(): void {
160162
}
161163

162164
function dispatchMenuAction(action: string): void {
163-
const existingWindow = BrowserWindow.getFocusedWindow() ?? mainWindow ?? BrowserWindow.getAllWindows()[0];
165+
const existingWindow =
166+
BrowserWindow.getFocusedWindow() ?? mainWindow ?? BrowserWindow.getAllWindows()[0];
164167
const targetWindow = existingWindow ?? createWindow();
165168
if (!existingWindow) {
166169
mainWindow = targetWindow;
Collapse file

‎apps/server/integration/fixtures/providerRuntime.ts‎

Copy file name to clipboardExpand all lines: apps/server/integration/fixtures/providerRuntime.ts
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ const THREAD_ID = ProviderThreadId.makeUnsafe("fixture-thread");
1313
const TURN_ID = ProviderTurnId.makeUnsafe("fixture-turn");
1414
const REQUEST_ID = ApprovalRequestId.makeUnsafe("req-1");
1515

16-
function baseEvent(eventId: string, createdAt: string): Pick<
17-
ProviderRuntimeEvent,
18-
"eventId" | "provider" | "sessionId" | "createdAt"
19-
> {
16+
function baseEvent(
17+
eventId: string,
18+
createdAt: string,
19+
): Pick<ProviderRuntimeEvent, "eventId" | "provider" | "sessionId" | "createdAt"> {
2020
return {
2121
eventId: EventId.makeUnsafe(eventId),
2222
provider: PROVIDER,
Collapse file

‎apps/server/integration/orchestrationEngine.integration.test.ts‎

Copy file name to clipboardExpand all lines: apps/server/integration/orchestrationEngine.integration.test.ts
+45-40Lines changed: 45 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@ const asMessageId = (value: string): MessageId => MessageId.makeUnsafe(value);
2929
const asProjectId = (value: string): ProjectId => ProjectId.makeUnsafe(value);
3030
const asThreadId = (value: string): ThreadId => ThreadId.makeUnsafe(value);
3131
const asEventId = (value: string): EventId => EventId.makeUnsafe(value);
32-
const asProviderSessionId = (value: string): ProviderSessionId => ProviderSessionId.makeUnsafe(value);
32+
const asProviderSessionId = (value: string): ProviderSessionId =>
33+
ProviderSessionId.makeUnsafe(value);
3334
const asProviderThreadId = (value: string): ProviderThreadId => ProviderThreadId.makeUnsafe(value);
3435
const asProviderTurnId = (value: string): ProviderTurnId => ProviderTurnId.makeUnsafe(value);
35-
const asApprovalRequestId = (value: string): ApprovalRequestId => ApprovalRequestId.makeUnsafe(value);
36+
const asApprovalRequestId = (value: string): ApprovalRequestId =>
37+
ApprovalRequestId.makeUnsafe(value);
3638

3739
const PROJECT_ID = asProjectId("project-1");
3840
const THREAD_ID = asThreadId("thread-1");
@@ -45,7 +47,8 @@ function nowIso() {
4547
return new Date().toISOString();
4648
}
4749

48-
const sleep = (ms: number) => Effect.promise(() => new Promise<void>((resolve) => setTimeout(resolve, ms)));
50+
const sleep = (ms: number) =>
51+
Effect.promise(() => new Promise<void>((resolve) => setTimeout(resolve, ms)));
4952

5053
function waitForSync<A>(
5154
read: () => A,
@@ -78,9 +81,7 @@ function runtimeBase(eventId: string, createdAt: string) {
7881
};
7982
}
8083

81-
function withHarness<A, E>(
82-
use: (harness: OrchestrationIntegrationHarness) => Effect.Effect<A, E>,
83-
) {
84+
function withHarness<A, E>(use: (harness: OrchestrationIntegrationHarness) => Effect.Effect<A, E>) {
8485
return Effect.acquireUseRelease(
8586
makeOrchestrationIntegrationHarness,
8687
use,
@@ -176,7 +177,9 @@ it.live("runs a single turn end-to-end and persists checkpoint state in sqlite +
176177
THREAD_ID,
177178
(entry) =>
178179
entry.session?.status === "ready" &&
179-
entry.messages.some((message) => message.role === "assistant" && message.streaming === false) &&
180+
entry.messages.some(
181+
(message) => message.role === "assistant" && message.streaming === false,
182+
) &&
180183
entry.checkpoints.length === 1,
181184
);
182185
assert.equal(thread.checkpoints[0]?.status, "ready");
@@ -317,7 +320,10 @@ it.live("runs multi-turn file edits and persists checkpoint diffs", () =>
317320
const secondCheckpoint = secondTurnThread.checkpoints.find(
318321
(checkpoint) => checkpoint.checkpointTurnCount === 2,
319322
);
320-
assert.equal(secondCheckpoint?.files.some((file) => file.path === "README.md"), true);
323+
assert.equal(
324+
secondCheckpoint?.files.some((file) => file.path === "README.md"),
325+
true,
326+
);
321327

322328
const checkpointRows = yield* harness.checkpointRepository.listByThreadId({
323329
threadId: THREAD_ID,
@@ -394,9 +400,8 @@ it.live("tracks approval requests and resolves pending approvals on user respons
394400
text: "Run command needing approval",
395401
});
396402

397-
const thread = yield* harness.waitForThread(
398-
THREAD_ID,
399-
(entry) => entry.activities.some((activity) => activity.kind === "approval.requested"),
403+
const thread = yield* harness.waitForThread(THREAD_ID, (entry) =>
404+
entry.activities.some((activity) => activity.kind === "approval.requested"),
400405
);
401406
assert.equal(
402407
thread.activities.some((activity) => activity.kind === "approval.requested"),
@@ -687,39 +692,39 @@ it.live("reverts to an earlier checkpoint and trims checkpoint projections + git
687692
),
688693
);
689694

690-
it.live("appends checkpoint.revert.failed activity when revert is requested without an active session", () =>
691-
withHarness((harness) =>
692-
Effect.gen(function* () {
693-
yield* seedProjectAndThread(harness);
694-
695-
yield* harness.engine.dispatch({
696-
type: "thread.checkpoint.revert",
697-
commandId: asCommandId("cmd-checkpoint-revert-no-session"),
698-
threadId: THREAD_ID,
699-
turnCount: 0,
700-
createdAt: nowIso(),
701-
});
702-
703-
const thread = yield* harness.waitForThread(
704-
THREAD_ID,
705-
(entry) =>
695+
it.live(
696+
"appends checkpoint.revert.failed activity when revert is requested without an active session",
697+
() =>
698+
withHarness((harness) =>
699+
Effect.gen(function* () {
700+
yield* seedProjectAndThread(harness);
701+
702+
yield* harness.engine.dispatch({
703+
type: "thread.checkpoint.revert",
704+
commandId: asCommandId("cmd-checkpoint-revert-no-session"),
705+
threadId: THREAD_ID,
706+
turnCount: 0,
707+
createdAt: nowIso(),
708+
});
709+
710+
const thread = yield* harness.waitForThread(THREAD_ID, (entry) =>
706711
entry.activities.some(
707712
(activity) =>
708713
activity.kind === "checkpoint.revert.failed" &&
709714
typeof activity.payload === "object" &&
710715
activity.payload !== null,
711716
),
712-
);
713-
const failureActivity = thread.activities.find(
714-
(activity) => activity.kind === "checkpoint.revert.failed",
715-
);
716-
assert.equal(failureActivity !== undefined, true);
717-
assert.equal(
718-
String((failureActivity?.payload as { readonly detail?: string } | undefined)?.detail).includes(
719-
"No active provider session",
720-
),
721-
true,
722-
);
723-
}),
724-
),
717+
);
718+
const failureActivity = thread.activities.find(
719+
(activity) => activity.kind === "checkpoint.revert.failed",
720+
);
721+
assert.equal(failureActivity !== undefined, true);
722+
assert.equal(
723+
String(
724+
(failureActivity?.payload as { readonly detail?: string } | undefined)?.detail,
725+
).includes("No active provider session"),
726+
true,
727+
);
728+
}),
729+
),
725730
);
Collapse file

‎apps/server/integration/providerService.integration.test.ts‎

Copy file name to clipboardExpand all lines: apps/server/integration/providerService.integration.test.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ it.effect("replays typed runtime fixture events", () =>
127127
harness: fixture.harness,
128128
sessionId: session.sessionId,
129129
userText: "hello",
130-
response: { events: codexTurnTextFixture },
130+
response: { events: codexTurnTextFixture },
131131
});
132132

133133
assert.deepEqual(
Collapse file

‎apps/server/src/checkpointing/Diffs.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/checkpointing/Diffs.ts
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ export interface TurnDiffFileSummary {
66
readonly deletions: number;
77
}
88

9-
export function parseTurnDiffFilesFromUnifiedDiff(diff: string): ReadonlyArray<TurnDiffFileSummary> {
9+
export function parseTurnDiffFilesFromUnifiedDiff(
10+
diff: string,
11+
): ReadonlyArray<TurnDiffFileSummary> {
1012
const normalized = diff.replace(/\r\n/g, "\n").trim();
1113
if (normalized.length === 0) {
1214
return [];
Collapse file

‎apps/server/src/codexAppServerManager.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/codexAppServerManager.ts
+10-9Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,10 @@ export class CodexAppServerManager extends EventEmitter<CodexAppServerManagerEve
383383
return this.parseThreadSnapshot("thread/read", response);
384384
}
385385

386-
async rollbackThread(sessionId: ProviderSessionId, numTurns: number): Promise<CodexThreadSnapshot> {
386+
async rollbackThread(
387+
sessionId: ProviderSessionId,
388+
numTurns: number,
389+
): Promise<CodexThreadSnapshot> {
387390
const context = this.requireSession(sessionId);
388391
const threadId = context.session.threadId;
389392
if (!threadId) {
@@ -822,19 +825,18 @@ export class CodexAppServerManager extends EventEmitter<CodexAppServerManagerEve
822825
private parseThreadSnapshot(method: string, response: unknown): CodexThreadSnapshot {
823826
const responseRecord = this.readObject(response);
824827
const thread = this.readObject(responseRecord, "thread");
825-
const threadIdRaw = this.readString(thread, "id") ??
826-
this.readString(responseRecord, "threadId");
828+
const threadIdRaw =
829+
this.readString(thread, "id") ?? this.readString(responseRecord, "threadId");
827830
if (!threadIdRaw) {
828831
throw new Error(`${method} response did not include a thread id.`);
829832
}
830833
const threadId = ProviderThreadId.makeUnsafe(threadIdRaw);
831834

832-
const turnsRaw = this.readArray(thread, "turns") ?? this.readArray(responseRecord, "turns") ?? [];
835+
const turnsRaw =
836+
this.readArray(thread, "turns") ?? this.readArray(responseRecord, "turns") ?? [];
833837
const turns = turnsRaw.map((turnValue, index) => {
834838
const turn = this.readObject(turnValue);
835-
const turnIdRaw =
836-
this.readString(turn, "id") ??
837-
`${threadIdRaw}:turn:${index + 1}`;
839+
const turnIdRaw = this.readString(turn, "id") ?? `${threadIdRaw}:turn:${index + 1}`;
838840
const turnId = ProviderTurnId.makeUnsafe(turnIdRaw);
839841
const items = this.readArray(turn, "items") ?? [];
840842
return {
@@ -900,8 +902,7 @@ export class CodexAppServerManager extends EventEmitter<CodexAppServerManagerEve
900902
this.readString(params, "turnId") ?? this.readString(this.readObject(params, "turn"), "id"),
901903
);
902904
const itemId = toProviderItemId(
903-
this.readString(params, "itemId") ??
904-
this.readString(this.readObject(params, "item"), "id"),
905+
this.readString(params, "itemId") ?? this.readString(this.readObject(params, "item"), "id"),
905906
);
906907

907908
if (threadId) {
Collapse file

‎apps/server/src/config.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/config.ts
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export interface ServerConfigShape {
1010
readonly port: number;
1111
readonly host: string | undefined;
1212
readonly cwd: string;
13+
readonly keybindingsConfigPath: string;
1314
readonly stateDir: string;
1415
readonly staticDir: string | undefined;
1516
readonly devUrl: URL | undefined;

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.