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
9 changes: 6 additions & 3 deletions apps/factory/agent/lib/harness-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ export function createFactoryHarness(
webSearch: true
});
}
case "cursor":
case "cursor": {
// Cursor controls provider routing itself. Keep its native default model.
return createCursor({ auth: "auto", port: FACTORY_HARNESS_PORT });
}
case "opencode": {
const selected = splitGatewayModel(model);
return createOpenCode({
Expand All @@ -119,17 +120,19 @@ export function createFactoryHarness(
port: FACTORY_HARNESS_PORT
});
}
case "pi":
case "pi": {
return createPi({
auth: "ai-gateway",
...(model === undefined ? {} : { model })
});
case "fx":
}
case "fx": {
return createFx({
auth: "ai-gateway",
...(model === undefined ? {} : { model }),
port: FACTORY_HARNESS_PORT
});
}
}
}

Expand Down
9 changes: 5 additions & 4 deletions apps/factory/app/workspace-client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,13 @@ function WorkspaceChat({
if (restarting) return;

restarting = true;
while (reconnectRequested && !disposed) {
while (reconnectRequested) {
await streamTask;
if (disposed) break;

reconnectRequested = false;
controller = new AbortController();
const streamController = new AbortController();
controller = streamController;
const session = new Client({
headers: CONSOLE_HEADERS,
host: ""
Expand All @@ -216,13 +217,13 @@ function WorkspaceChat({
streamTask = (async () => {
try {
for await (const event of session.stream({
signal: controller?.signal
signal: streamController.signal
})) {
streamIndex.current = session.state.streamIndex;
setExternalEvents((current) => appendUniqueEvent(current, event));
}
} catch (cause) {
if (!controller?.signal.aborted) console.error(cause);
if (!streamController.signal.aborted) console.error(cause);
}
})();
}
Expand Down
1 change: 1 addition & 0 deletions crates/turborepo-filewatch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1630,6 +1630,7 @@ fn route_materialized_interests(
route_event(registry, Ok(&event));
}

#[allow(clippy::too_many_arguments)]
fn run_watcher(
#[cfg(target_os = "macos")] backend: MacOsBackend,
root: &AbsoluteSystemPath,
Expand Down
Loading