From 8957e56d36bd95a751f894ffc52ccebf6c52ed10 Mon Sep 17 00:00:00 2001 From: Renfei Zhou Date: Wed, 25 Nov 2026 04:36:47 +0000 Subject: [PATCH] fix(fork): resolve upstream merge 4e6b1fa771 (2026-11-24) Resolves the 10 conflicted files of commit A (5422d07574) and the merge breaks: - Identify.ts takes upstream's version (#42299 drops Codex and Claude account ids from analytics). The Codex account-change restart (#29) keeps its auth.json reader in the fork-only file fork/codexAccount.ts. - AgentSessionScanner: the checkout cache check joins upstream's new isT3OwnedPath (#42036). - GitVcsDriver, storageCleanup, cli/thread: imports from both sides. - OpenCode: upstream's skillsMentioned(location, text) gets the text after the inline context (#42141). - Sidebar: upstream's triage-aware operate check, then the fork's display mode action. - Minimap: upstream's markdownPlainText preview (#42575), which already keeps single tildes. - AcpAdapterV2.test: upstream's startup phase checks and the fork's account checks. - settleAfterRun's new steer check (#42092) ignores FYI items, which are no user input; FyiSettle.test mocks turnItems and covers it. - AntigravityAdapterV2.test: new upstream test passes profileDirectory. - agentContextBudget.json: measured values. - fork/previewChrome.ts: full Chrome pin follows upstream's PreviewBrowser.VERSION 158.0.8127.88 (#42043), with the archive sizes and sha256 of that build. - fork/antigravityAccountEmail.ts: upstream's formatter output. Co-Authored-By: Claude Opus 5.5 --- apps/server/src/cli/thread.ts | 3 - .../antigravityAccountEmail.ts | 4 +- apps/server/src/fork/codexAccount.ts | 57 +++++++++++++++++++ apps/server/src/fork/fyi/FyiSettle.test.ts | 55 ++++++++++++++++++ apps/server/src/fork/previewChrome.ts | 18 +++--- .../Adapters/AcpAdapterV2.test.ts | 21 +++---- .../Adapters/AntigravityAdapterV2.test.ts | 1 + .../Adapters/CodexAdapterV2.ts | 21 +------ .../ThreadManagementService.ts | 1 + .../server/src/project/AgentSessionScanner.ts | 16 +----- .../src/provider/agentContextBudget.json | 8 +-- apps/server/src/storageCleanup.ts | 3 - apps/server/src/telemetry/Identify.ts | 35 ------------ apps/server/src/vcs/GitVcsDriver.ts | 7 +-- apps/web/src/components/Sidebar.tsx | 6 +- .../components/chat/timelineMinimapItems.ts | 6 -- .../src/server/v2/adapter.ts | 8 +-- 17 files changed, 142 insertions(+), 128 deletions(-) create mode 100644 apps/server/src/fork/codexAccount.ts diff --git a/apps/server/src/cli/thread.ts b/apps/server/src/cli/thread.ts index 35f4fa16e12e..f41a71be292f 100644 --- a/apps/server/src/cli/thread.ts +++ b/apps/server/src/cli/thread.ts @@ -34,11 +34,8 @@ import { mcpToolSession, type McpToolSession } from "../mcp/AcpMcpStdioBridge.ts import { expandHomePath } from "../os-jank.ts"; import * as ProcessRunner from "../processRunner.ts"; import { readLiveServerRuntimeState } from "../serverRuntimeState.ts"; -<<<<<<< origin/main import { userViewCommand } from "../fork/userView/userViewCommand.ts"; -======= import { unsetInheritedRepositoryEnv } from "../vcs/VcsProcess.ts"; ->>>>>>> upstream/main import { projectLocationFlags, resolveCliAuthConfig } from "./config.ts"; /** diff --git a/apps/server/src/fork/antigravityAccountEmail/antigravityAccountEmail.ts b/apps/server/src/fork/antigravityAccountEmail/antigravityAccountEmail.ts index 608884120cf1..16f856727379 100644 --- a/apps/server/src/fork/antigravityAccountEmail/antigravityAccountEmail.ts +++ b/apps/server/src/fork/antigravityAccountEmail/antigravityAccountEmail.ts @@ -25,7 +25,5 @@ export const withAntigravityAccountEmail = return email ? { credentialFingerprint, credentialEmail: email } : { credentialFingerprint }; }); -export const antigravityAccountFields = ( - account: AntigravityAccount, -): AntigravityAccountIdentity => +export const antigravityAccountFields = (account: AntigravityAccount): AntigravityAccountIdentity => typeof account === "string" ? { credentialFingerprint: account } : account; diff --git a/apps/server/src/fork/codexAccount.ts b/apps/server/src/fork/codexAccount.ts new file mode 100644 index 000000000000..b5f3c376a69d --- /dev/null +++ b/apps/server/src/fork/codexAccount.ts @@ -0,0 +1,57 @@ +import * as Effect from "effect/Effect"; +import * as Base64Url from "effect/encoding/Base64Url"; +import * as FileSystem from "effect/FileSystem"; +import * as Option from "effect/Option"; +import * as Result from "effect/Result"; +import * as Schema from "effect/Schema"; + +/** + * Codex writes `tokens` only for ChatGPT logins and omits the key for API-key, + * agent-identity, and personal-access-token logins, so its absence is a + * supported install and not a malformed file. `account_id` is the ChatGPT + * workspace, which a whole Team shares; the `id_token` names the person. + */ +const CodexAuthJsonSchema = Schema.Struct({ + tokens: Schema.optionalKey( + Schema.Struct({ + account_id: Schema.String, + id_token: Schema.optionalKey(Schema.String), + }), + ), +}); +const decodeCodexAuthJson = Schema.decodeUnknownOption(Schema.fromJsonString(CodexAuthJsonSchema)); + +// `sub` names the login method (`google-oauth2|…`), so one person can have several. +// `user_id` (`user-…`) is the OpenAI account and is the same for every login. +const IdTokenClaims = Schema.Struct({ + "https://api.openai.com/auth": Schema.Struct({ user_id: Schema.NonEmptyString }), +}); +const decodeIdTokenClaims = Schema.decodeUnknownOption(Schema.fromJsonString(IdTokenClaims)); + +const openAiUserId = (idToken: string) => { + const payload = Base64Url.decodeString(idToken.split(".")[1] ?? ""); + return Result.isSuccess(payload) + ? Option.map( + decodeIdTokenClaims(payload.success), + (claims) => claims["https://api.openai.com/auth"].user_id, + ) + : Option.none(); +}; + +// A Team shares `account_id`; the id_token's user id tells its seats apart. +export const readCodexAccount = Effect.fn("CodexAdapterV2.readAccount")(function* ( + fileSystem: FileSystem.FileSystem, + authPath: string, +) { + const text = yield* fileSystem.readFileString(authPath).pipe(Effect.option); + const tokens = Option.flatMap(Option.flatMap(text, decodeCodexAuthJson), (auth) => + Option.fromUndefinedOr(auth.tokens), + ); + return Option.map(tokens, (tokens) => { + const userId = Option.fromUndefinedOr(tokens.id_token).pipe( + Option.flatMap(openAiUserId), + Option.getOrElse(() => ""), + ); + return `${tokens.account_id}\n${userId}`; + }); +}); diff --git a/apps/server/src/fork/fyi/FyiSettle.test.ts b/apps/server/src/fork/fyi/FyiSettle.test.ts index 2d9396ced041..8e6cf01da9da 100644 --- a/apps/server/src/fork/fyi/FyiSettle.test.ts +++ b/apps/server/src/fork/fyi/FyiSettle.test.ts @@ -9,11 +9,13 @@ import { type OrchestrationV2ThreadProjection, } from "@t3tools/contracts"; import * as Deferred from "effect/Deferred"; +import * as Duration from "effect/Duration"; import * as Effect from "effect/Effect"; import * as Fiber from "effect/Fiber"; import * as Layer from "effect/Layer"; import * as Queue from "effect/Queue"; import * as Stream from "effect/Stream"; +import * as TestClock from "effect/testing/TestClock"; import * as CommandReceiptStore from "../../orchestration-v2/CommandReceiptStore.ts"; import * as Orchestrator from "../../orchestration-v2/Orchestrator.ts"; @@ -59,6 +61,7 @@ it.effect("settleAfterRun settles after a notification run that carried an FYI", ({ thread: { id: threadId, projectId, deletedAt: null }, runs: raced ? [...runs, nextRun] : runs, + turnItems: [], messages: [ { id: MessageId.make("original"), runId, role: "user" as const }, { @@ -120,3 +123,55 @@ it.effect("settleAfterRun settles after a notification run that carried an FYI", expect(dispatched).toEqual(["thread.settle"]); }), ); + +it.effect("settleAfterRun settles after an FYI read once the settle was requested", () => + Effect.gen(function* () { + const projectId = ProjectId.make("project:thread-management:settle-after-fyi"); + const threadId = ThreadId.make("thread:thread-management:settle-after-fyi"); + const runId = RunId.make("run:thread-management:settle-after-fyi"); + yield* TestClock.adjust(Duration.millis(60_000)); + const dispatched: Array = []; + const layerTest = ThreadManagementService.layer.pipe( + Layer.provide(Layer.mock(ProviderSessionManager.ProviderSessionManagerV2)({})), + Layer.provide( + Layer.mock(Orchestrator.OrchestratorV2)({ + getThreadEventSequence: () => Effect.succeed(0), + restartContinuationPending: () => Effect.succeed(false), + streamStoredEventsFrom: () => Stream.empty, + getThreadRecords: () => + Effect.succeed({ + thread: { id: threadId, projectId, deletedAt: null }, + runs: [{ id: runId, ordinal: 1, status: "completed", userMessageId: "original" }], + messages: [ + { id: "original", runId, role: "user" }, + { id: "fyi", runId, role: "user", fyi: true }, + ], + turnItems: [ + { + runId, + type: "user_message", + inputIntent: "steer", + fyi: true, + status: "completed", + createdAt: "1970-01-01T00:01:30.000Z", + completedAt: "1970-01-01T00:01:30.000Z", + }, + ], + } as unknown as OrchestrationV2ThreadProjection), + dispatch: (command) => + Effect.sync(() => { + dispatched.push(command.type); + return { sequence: 1, storedEvents: [] } as never; + }), + }), + ), + Layer.provide(ServerSettings.layerTest()), + Layer.provide(CommandReceiptStore.layer.pipe(Layer.provide(SqlitePersistence.layerMemory))), + ); + const service = yield* ThreadManagementService.ThreadManagementService.pipe( + Effect.provide(layerTest), + ); + yield* service.settleAfterRun({ projectId, threadId, runId }); + expect(dispatched).toEqual(["thread.settle"]); + }), +); diff --git a/apps/server/src/fork/previewChrome.ts b/apps/server/src/fork/previewChrome.ts index c6b8f39bcf19..c15c8a55adfd 100644 --- a/apps/server/src/fork/previewChrome.ts +++ b/apps/server/src/fork/previewChrome.ts @@ -8,23 +8,23 @@ import type { PreviewBrowserRelease } from "../preview/PreviewBrowser.ts"; // macOS keeps the shell: the Chrome app bundle holds symlinks the installer will not unpack. // Pin from each chrome zip in known-good-versions-with-downloads.json, at PreviewBrowser.VERSION: // the browser's --user-agent names that version in both modes. -const VERSION = "158.0.8127.36"; +const VERSION = "158.0.8127.88"; const ARCHIVES: Partial> = { linux64: { - bytes: 208_062_943, - sha256: "dba9cc838e1ce269c33ea68170881127bd15d078fc3ca5891c90802819a4d7c7", + bytes: 208_082_347, + sha256: "59e3b43f8b3aaa292238fbdcfb36a93127debd53e212510dcdc2cc8812b4b57e", }, "linux-arm64": { - bytes: 205_790_900, - sha256: "f811b64a50cbc73f94fda7b3f3b3bf62be5d9409b3207e6ead9b61e6706afffe", + bytes: 205_794_810, + sha256: "91669b5de79af808d498037dd974e4b09461776a1b5240b3bb656abd17e5d3ab", }, win32: { - bytes: 196_218_437, - sha256: "427a02beb8887ceca6a1847dc67445580741c8c40bd15af334993d3a59863943", + bytes: 196_213_788, + sha256: "b994ff42d7b4b6c90bf66e13d7f4653ee4bb88dd5677e08241c2f3f01a61e877", }, win64: { - bytes: 214_927_656, - sha256: "6a8ad290952cc612c7777ffb3eb62f345539a2a1a8d440cfac190c6d36b34d2c", + bytes: 214_931_627, + sha256: "fda73ca9ffc7f02c5c85165cb472152540a76a7cecd8ec11314ea781e4454109", }, }; diff --git a/apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.ts b/apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.ts index ce2c065b42c0..7d9a238685a4 100644 --- a/apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.ts +++ b/apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.ts @@ -5985,7 +5985,15 @@ describe("AcpAdapterV2", () => { ); assert.equal(runtimeOrdinalSeen, 2); assert.lengthOf(runtimeInputs, 2); -<<<<<<< origin/main + // Loading the thread into the replacement agent is reported, and cleared before the turn runs. + assert.deepEqual( + Array.from(startup, (event) => + event.type === "provider_session.updated" + ? (event.providerSession.startupPhase ?? null) + : "turn running", + ).slice(0, 3), + ["resume", null, "turn running"], + ); assert.isFalse(yield* accountChanged!, "restarted process read the new account"); account = Option.some("account-c"); @@ -6000,17 +6008,6 @@ describe("AcpAdapterV2", () => { assert.isFalse(yield* accountChanged!, "replacement process read the new account"); account = Option.none(); assert.isFalse(yield* accountChanged!, "unreadable"); -======= - // Loading the thread into the replacement agent is reported, and cleared before the turn runs. - assert.deepEqual( - Array.from(startup, (event) => - event.type === "provider_session.updated" - ? (event.providerSession.startupPhase ?? null) - : "turn running", - ).slice(0, 3), - ["resume", null, "turn running"], - ); ->>>>>>> upstream/main }).pipe(Effect.provide(layerTest)), ); diff --git a/apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts b/apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts index bfb11d8f327e..71ccad3c04d9 100644 --- a/apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts +++ b/apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts @@ -3024,6 +3024,7 @@ describe("AntigravityAdapterV2 update_steps checklist", () => { const adapter = yield* makeAntigravityAdapterV2({ instanceId, selfInvocation: yield* resolveSelfInvocation(), + profileDirectory: unusedProfileDirectory, makeRuntime: (input) => makeAntigravityAcpRuntime({ ...input, diff --git a/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts b/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts index 02bb9abdfef0..8cb016e305ac 100644 --- a/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts +++ b/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts @@ -19,7 +19,6 @@ import { import type { ManagedServerProvider } from "@t3tools/provider-core/server/snapshot"; import type { CodexEffectiveRuntime } from "../../provider/CodexManagedRuntime.ts"; import { classifyCodexManagedError } from "../../provider/CodexManagedErrors.ts"; -import { CodexAuthJsonSchema, openAiUserId } from "../../telemetry/Identify.ts"; import { buildCodexInitializeParams, codexAppServerEnvironment, @@ -117,6 +116,7 @@ import { ChildProcess, ChildProcessSpawner } from "effect/process"; import { resolveAttachmentPath, resolveAttachmentPathById } from "../../attachmentStore.ts"; import * as PortScanner from "../../preview/PortScanner.ts"; import { getCodexServiceTierOptionValue } from "../../codexModelOptions.ts"; +import { readCodexAccount } from "../../fork/codexAccount.ts"; import { resolveCodexTurnServiceTier } from "../../fork/codexServiceTier.ts"; import { codexCompactionNoteItems, @@ -345,25 +345,6 @@ const decodeCodexBackgroundTerminalTerminateResponse = Schema.decodeUnknownEffec const decodeCodexBackgroundTerminalsListResponse = Schema.decodeUnknownEffect( CodexBackgroundTerminalsListResponse, ); -const decodeCodexAuthJson = Schema.decodeUnknownOption(Schema.fromJsonString(CodexAuthJsonSchema)); - -// A Team shares `account_id`; the id_token's user id tells its seats apart. -const readCodexAccount = Effect.fn("CodexAdapterV2.readAccount")(function* ( - fileSystem: FileSystem.FileSystem, - authPath: string, -) { - const text = yield* fileSystem.readFileString(authPath).pipe(Effect.option); - const tokens = Option.flatMap(Option.flatMap(text, decodeCodexAuthJson), (auth) => - Option.fromUndefinedOr(auth.tokens), - ); - return Option.map(tokens, (tokens) => { - const userId = Option.fromUndefinedOr(tokens.id_token).pipe( - Option.flatMap(openAiUserId), - Option.getOrElse(() => ""), - ); - return `${tokens.account_id}\n${userId}`; - }); -}); // Initialize normally answers in under a second; leave room for a slow first launch. const CODEX_INITIALIZE_TIMEOUT = "30 seconds"; const CodexThreadSampleResponse = Schema.Struct({ text: Schema.NullOr(Schema.String) }); diff --git a/apps/server/src/orchestration-v2/ThreadManagementService.ts b/apps/server/src/orchestration-v2/ThreadManagementService.ts index 69563859d336..45d8e9017a9c 100644 --- a/apps/server/src/orchestration-v2/ThreadManagementService.ts +++ b/apps/server/src/orchestration-v2/ThreadManagementService.ts @@ -1301,6 +1301,7 @@ const make = Effect.gen(function* () { turnItems.some( (item) => item.type === "user_message" && + item.fyi !== true && (item.inputIntent === "steer" || item.inputIntent === "promoted_queued_to_steer") && item.completedAt !== null && !DateTime.isLessThan(DateTime.makeUnsafe(item.completedAt), requestedAt), diff --git a/apps/server/src/project/AgentSessionScanner.ts b/apps/server/src/project/AgentSessionScanner.ts index 9298bdf2564c..d0a28a92fd99 100644 --- a/apps/server/src/project/AgentSessionScanner.ts +++ b/apps/server/src/project/AgentSessionScanner.ts @@ -925,11 +925,6 @@ export const make = Effect.gen(function* () { const serverSettings = yield* ServerSettings.ServerSettingsService; const projectStore = yield* ProjectStore.ProjectStoreV2; const runtimes = yield* ProviderSessionRuntime.ProviderSessionRuntimeRepository; -<<<<<<< origin/main - const baseDir = path.resolve(serverConfig.baseDir); - const worktreesDir = path.resolve(serverConfig.worktreesDir); - const homeCacheDir = yield* homeCheckoutCacheDir; -======= const configuredT3Dirs = { baseDir: path.resolve(serverConfig.baseDir), worktreesDir: path.resolve(serverConfig.worktreesDir), @@ -941,7 +936,7 @@ export const make = Effect.gen(function* () { baseDir: yield* realPathOf(configuredT3Dirs.baseDir), worktreesDir: yield* realPathOf(configuredT3Dirs.worktreesDir), }; ->>>>>>> upstream/main + const homeCacheDir = yield* homeCheckoutCacheDir; const platform = yield* HostProcess.Platform; const isWindows = platform === "win32"; const foldWorktreeCase = isWindows; @@ -967,17 +962,12 @@ export const make = Effect.gen(function* () { ); const isT3OwnedPath = (candidatePath: string, t3Dirs = configuredT3Dirs) => normalizeForWorktreeMatch(candidatePath, foldWorktreeCase).startsWith( -<<<<<<< origin/main - normalizeForWorktreeMatch(baseDir, foldWorktreeCase), + normalizeForWorktreeMatch(t3Dirs.baseDir, foldWorktreeCase), ) || - isT3ManagedWorktree(candidatePath, worktreesDir, foldWorktreeCase) || + isT3ManagedWorktree(candidatePath, t3Dirs.worktreesDir, foldWorktreeCase) || isCheckoutCachePath(candidatePath, { homeCacheDir, caseFold: foldWorktreeCase }); -======= - normalizeForWorktreeMatch(t3Dirs.baseDir, foldWorktreeCase), - ) || isT3ManagedWorktree(candidatePath, t3Dirs.worktreesDir, foldWorktreeCase); const isExcludedProjectPath = (candidatePath: string, t3Dirs = configuredT3Dirs) => isScratchPath(candidatePath) || isT3OwnedPath(candidatePath, t3Dirs); ->>>>>>> upstream/main const listDirectory = (directory: string) => fileSystem.readDirectory(directory).pipe(Effect.orElseSucceed((): ReadonlyArray => [])); diff --git a/apps/server/src/provider/agentContextBudget.json b/apps/server/src/provider/agentContextBudget.json index 1e2090fd442e..2691b5fbafad 100644 --- a/apps/server/src/provider/agentContextBudget.json +++ b/apps/server/src/provider/agentContextBudget.json @@ -1,11 +1,5 @@ { -<<<<<<< origin/main "claudeSystemAppendBytes": 5945, "codexAdditionalContextBytes": 7339, - "mcpToolListJsonBytes": 67345 -======= - "claudeSystemAppendBytes": 6245, - "codexAdditionalContextBytes": 7639, - "mcpToolListJsonBytes": 61914 ->>>>>>> upstream/main + "mcpToolListJsonBytes": 67550 } diff --git a/apps/server/src/storageCleanup.ts b/apps/server/src/storageCleanup.ts index bb8adb0a5616..60327eb808d5 100644 --- a/apps/server/src/storageCleanup.ts +++ b/apps/server/src/storageCleanup.ts @@ -58,14 +58,11 @@ import { forkParked } from "./serverActivation.ts"; import * as Settings from "./serverSettings.ts"; import * as TerminalManager from "./terminal/Manager.ts"; import { isFilesystemRoot, managedWorktreesDirectories } from "./worktreesDirectory.ts"; -<<<<<<< origin/main import { homeCheckoutCacheDir, isCheckoutCachePath, } from "./fork/reflinkWorktrees/checkoutCacheSites.ts"; -======= import * as CheckpointCaptureIndex from "./vcs/checkpointCaptureIndex.ts"; ->>>>>>> upstream/main import * as GitVcsDriver from "./vcs/GitVcsDriver.ts"; import { isNonRepositoryGitStderr } from "./vcs/GitVcsDriverCore.ts"; import { isLinkedWorktree, removeLinkedWorktree } from "./vcs/worktreeRemoval.ts"; diff --git a/apps/server/src/telemetry/Identify.ts b/apps/server/src/telemetry/Identify.ts index 8a83face33bb..6f1351b7f053 100644 --- a/apps/server/src/telemetry/Identify.ts +++ b/apps/server/src/telemetry/Identify.ts @@ -12,41 +12,6 @@ import { CLOUD_LINKED_USER_ID } from "../cloud/config.ts"; import * as ServerConfig from "../config.ts"; /** -<<<<<<< origin/main - * Codex writes `tokens` only for ChatGPT logins and omits the key for API-key, - * agent-identity, and personal-access-token logins, so its absence is a - * supported install and not a malformed file. `account_id` is the ChatGPT - * workspace, which a whole Team shares; the `id_token` names the person. - */ -export const CodexAuthJsonSchema = Schema.Struct({ - tokens: Schema.optionalKey( - Schema.Struct({ - account_id: Schema.String, - id_token: Schema.optionalKey(Schema.String), - }), - ), -}); - -/** `userID` is random per machine. `oauthAccount` is present only while Claude Code is logged in. */ -const ClaudeJsonSchema = Schema.Struct({ - userID: Schema.optionalKey(Schema.String), - oauthAccount: Schema.optionalKey( - Schema.Struct({ - accountUuid: Schema.optionalKey(Schema.String), - }), - ), -}); - -// `sub` names the login method (`google-oauth2|…`), so one person can have several. -// `user_id` (`user-…`) is the OpenAI account and is the same for every login. -const IdTokenClaims = Schema.Struct({ - "https://api.openai.com/auth": Schema.Struct({ user_id: Schema.NonEmptyString }), -}); -const decodeIdTokenClaims = Schema.decodeUnknownOption(Schema.fromJsonString(IdTokenClaims)); - -/** -======= ->>>>>>> upstream/main * Who an install belongs to, from strongest to weakest. `connect` is the T3 * Connect account. `device` is a client device that connected. */ diff --git a/apps/server/src/vcs/GitVcsDriver.ts b/apps/server/src/vcs/GitVcsDriver.ts index 800673ceb1dd..f476e710d9f6 100644 --- a/apps/server/src/vcs/GitVcsDriver.ts +++ b/apps/server/src/vcs/GitVcsDriver.ts @@ -49,14 +49,9 @@ import { PATCH_RENDER_PREFIX_ARGS, splitNullSeparatedGitStdoutPaths, } from "./GitVcsDriverCore.ts"; -<<<<<<< origin/main -import * as CheckpointUntrackedBlobs from "./checkpointUntrackedBlobs.ts"; +import * as CheckpointCaptureIndex from "./checkpointCaptureIndex.ts"; import * as ReflinkCloner from "../fork/reflinkWorktrees/reflinkCloner.ts"; import type { CheckoutCacheRetention } from "../fork/reflinkWorktrees/fastCheckoutSetting.ts"; -======= -import * as CheckoutCloner from "./CheckoutCloner.ts"; -import * as CheckpointCaptureIndex from "./checkpointCaptureIndex.ts"; ->>>>>>> upstream/main import * as VcsDriver from "./VcsDriver.ts"; import * as VcsProcess from "./VcsProcess.ts"; diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index f1829f0e204b..cee1e1b65325 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -2766,16 +2766,12 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve ), ); if (clicked._tag === "Failure" || clicked.value === null) return; -<<<<<<< origin/main - if (threadActionRequiresOperate(clicked.value) && !checkThreadOperations([thread])) return; - if (await handleDisplayModeAction(threadRef, clicked.value)) return; -======= if ( threadActionRequiresOperate(clicked.value) && !checkThreadOperations([thread], isThreadTriageAction(clicked.value)) ) return; ->>>>>>> upstream/main + if (await handleDisplayModeAction(threadRef, clicked.value)) return; if (clicked.value?.startsWith("snooze:")) { const preset = clicked.value === "snooze:custom" diff --git a/apps/web/src/components/chat/timelineMinimapItems.ts b/apps/web/src/components/chat/timelineMinimapItems.ts index cd8f33688a73..daba0eb40361 100644 --- a/apps/web/src/components/chat/timelineMinimapItems.ts +++ b/apps/web/src/components/chat/timelineMinimapItems.ts @@ -104,15 +104,9 @@ export function markdownPlainText(markdown: string): string { // The tooltip shows a few lines; bound parsing work for long messages and streaming responses. function markdownMinimapPreview(markdown: string | null) { if (markdown === null) return null; -<<<<<<< origin/main - const compact = markdownNodeText(markdownTree(markdown.slice(0, 1_500), { singleTilde: false })) - .replace(/\s+/g, " ") - .trim(); -======= const compact = markdownPlainText( markdown.slice(0, splitsSurrogatePair(markdown, 1_500) ? 1_499 : 1_500), ); ->>>>>>> upstream/main return compact.length > 0 ? compact : null; } diff --git a/packages/provider-opencode/src/server/v2/adapter.ts b/packages/provider-opencode/src/server/v2/adapter.ts index 2fc0c487ee32..55c1b6fd75ef 100644 --- a/packages/provider-opencode/src/server/v2/adapter.ts +++ b/packages/provider-opencode/src/server/v2/adapter.ts @@ -4848,15 +4848,11 @@ export const make = Effect.fn("OpenCode2Adapter.make")(function* (instanceId: Pr ); } } -<<<<<<< origin/main // Mentions in inline context (handoff history, FYI messages) are not this turn's skills. - const mentions = skillMentions( + const skills = yield* skillsMentioned( + location, turnInput.message.text.slice(turnInput.inlineContextLength ?? 0), ); - const skills = mentions.length === 0 ? [] : yield* skillsMentioned(location, mentions); -======= - const skills = yield* skillsMentioned(location, text); ->>>>>>> upstream/main const files = yield* promptFiles(turnInput.message.attachments); const messageText = turnInput.resume ? "" : yield* promptText(turnInput); if (!sending()) return;