From 2155c9734b43cfdf8c97705bc9b7c792e689bc8d Mon Sep 17 00:00:00 2001 From: Maksym Diabin Date: Fri, 20 Feb 2026 18:12:15 +0100 Subject: [PATCH 1/2] fix(ui): make D letter distinguishable from O in ASCII logo Open the top-right and bottom-right corners of the D glyph so it no longer looks identical to O. Co-Authored-By: codemie-ai --- packages/opencode/src/cli/logo.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/opencode/src/cli/logo.ts b/packages/opencode/src/cli/logo.ts index 457d1ec7787..fdd8f3fd792 100644 --- a/packages/opencode/src/cli/logo.ts +++ b/packages/opencode/src/cli/logo.ts @@ -1,8 +1,8 @@ export const logo = [ " ▄ ", - "█▀▀▀ █▀▀█ █▀▀█ █▀▀█ █▄_▄█ _▀▀_ █▀▀█", + "█▀▀▀ █▀▀█ █▀▀▄ █▀▀█ █▄_▄█ _▀▀_ █▀▀█", "█___ █__█ █__█ █^^^ █_▀_█ _██_ █^^^", - "▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀___▀ _▀▀_ ▀▀▀▀", + "▀▀▀▀ ▀▀▀▀ ▀▀▀ ▀▀▀▀ ▀___▀ _▀▀_ ▀▀▀▀", ] export const marks = "_^~" From 67d95aad4491367b0e1a54e063acb340ed9286c4 Mon Sep 17 00:00:00 2001 From: Maksym Diabin Date: Fri, 20 Feb 2026 18:58:31 +0100 Subject: [PATCH 2/2] fix(ci): add explicit type annotations for tsgo Linux compatibility The tsgo native-preview binary on Linux cannot infer types for certain SDK callback parameters, causing TS7006 implicit-any errors in CI that don't appear on macOS. Add explicit type annotations to resolve the cross-platform inconsistency. Co-Authored-By: codemie-ai --- packages/opencode/src/acp/agent.ts | 58 +++++++++---------- packages/opencode/src/cli/cmd/run.ts | 4 +- .../src/cli/cmd/tui/routes/session/index.tsx | 2 +- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/opencode/src/acp/agent.ts b/packages/opencode/src/acp/agent.ts index 2cc87eff300..48359553a2e 100644 --- a/packages/opencode/src/acp/agent.ts +++ b/packages/opencode/src/acp/agent.ts @@ -79,8 +79,8 @@ export namespace ACP { ): Promise { const messages = await sdk.session .messages({ sessionID, directory }, { throwOnError: true }) - .then((x) => x.data) - .catch((error) => { + .then((x: any) => x.data) + .catch((error: any) => { log.error("failed to fetch messages for usage update", { error }) return undefined }) @@ -88,7 +88,7 @@ export namespace ACP { if (!messages) return const assistantMessages = messages.filter( - (m): m is { info: AssistantMessage; parts: SessionMessageResponse["parts"] } => m.info.role === "assistant", + (m: any): m is { info: AssistantMessage; parts: SessionMessageResponse["parts"] } => m.info.role === "assistant", ) const lastAssistant = assistantMessages[assistantMessages.length - 1] @@ -103,7 +103,7 @@ export namespace ACP { } const used = msg.tokens.input + (msg.tokens.cache?.read ?? 0) - const totalCost = assistantMessages.reduce((sum, m) => sum + m.info.cost, 0) + const totalCost = assistantMessages.reduce((sum: any, m: any) => sum + m.info.cost, 0) await connection .sessionUpdate({ @@ -277,8 +277,8 @@ export namespace ACP { }, { throwOnError: true }, ) - .then((x) => x.data) - .catch((error) => { + .then((x: any) => x.data) + .catch((error: any) => { log.error("unexpected error when fetching message", { error }) return undefined }) @@ -453,15 +453,15 @@ export namespace ACP { }, { throwOnError: true }, ) - .then((x) => x.data) - .catch((error) => { + .then((x: any) => x.data) + .catch((error: any) => { log.error("unexpected error when fetching message", { error }) return undefined }) if (!message || message.info.role !== "assistant") return - const part = message.parts.find((p) => p.id === props.partID) + const part = message.parts.find((p: any) => p.id === props.partID) if (!part) return if (part.type === "text" && props.field === "text" && part.ignored !== true) { @@ -614,13 +614,13 @@ export namespace ACP { }, { throwOnError: true }, ) - .then((x) => x.data) - .catch((err) => { + .then((x: any) => x.data) + .catch((err: any) => { log.error("unexpected error when fetching message", { error: err }) return undefined }) - const lastUser = messages?.findLast((m) => m.info.role === "user")?.info + const lastUser = messages?.findLast((m: any) => m.info.role === "user")?.info if (lastUser?.role === "user") { result.models.currentModelId = `${lastUser.model.providerID}/${lastUser.model.modelID}` this.sessionManager.setModel(sessionId, { @@ -665,13 +665,13 @@ export namespace ACP { }, { throwOnError: true }, ) - .then((x) => x.data ?? []) + .then((x: any) => x.data ?? []) - const sorted = sessions.toSorted((a, b) => b.time.updated - a.time.updated) - const filtered = cursor ? sorted.filter((s) => s.time.updated < cursor) : sorted + const sorted = sessions.toSorted((a: any, b: any) => b.time.updated - a.time.updated) + const filtered = cursor ? sorted.filter((s: any) => s.time.updated < cursor) : sorted const page = filtered.slice(0, limit) - const entries: SessionInfo[] = page.map((session) => ({ + const entries: SessionInfo[] = page.map((session: any) => ({ sessionId: session.id, cwd: session.directory, title: session.title, @@ -712,7 +712,7 @@ export namespace ACP { }, { throwOnError: true }, ) - .then((x) => x.data) + .then((x: any) => x.data) if (!forked) { throw new Error("Fork session returned no data") @@ -737,8 +737,8 @@ export namespace ACP { }, { throwOnError: true }, ) - .then((x) => x.data) - .catch((err) => { + .then((x: any) => x.data) + .catch((err: any) => { log.error("unexpected error when fetching message", { error: err }) return undefined }) @@ -1071,11 +1071,11 @@ export namespace ACP { }, { throwOnError: true }, ) - .then((resp) => resp.data!) + .then((resp: any) => resp.data!) return agents - .filter((agent) => agent.mode !== "subagent" && !agent.hidden) - .map((agent) => ({ + .filter((agent: any) => agent.mode !== "subagent" && !agent.hidden) + .map((agent: any) => ({ id: agent.name, name: agent.name, description: agent.description, @@ -1106,7 +1106,7 @@ export namespace ACP { const model = await defaultModel(this.config, directory) const sessionId = params.sessionId - const providers = await this.sdk.config.providers({ directory }).then((x) => x.data!.providers) + const providers: any[] = await this.sdk.config.providers({ directory }).then((x: any) => x.data!.providers) const entries = sortProvidersByName(providers) const availableVariants = modelVariantsFromProviders(entries, model) const currentVariant = this.sessionManager.getVariant(sessionId) @@ -1130,13 +1130,13 @@ export namespace ACP { }, { throwOnError: true }, ) - .then((resp) => resp.data!) + .then((resp: any) => resp.data!) - const availableCommands = commands.map((command) => ({ + const availableCommands = commands.map((command: any) => ({ name: command.name, description: command.description ?? "", })) - const names = new Set(availableCommands.map((c) => c.name)) + const names = new Set(availableCommands.map((c: any) => c.name)) if (!names.has("compact")) availableCommands.push({ name: "compact", @@ -1177,7 +1177,7 @@ export namespace ACP { }, { throwOnError: true }, ) - .catch((error) => { + .catch((error: any) => { log.error("failed to add mcp server", { name: key, error }) }) }), @@ -1210,9 +1210,9 @@ export namespace ACP { async unstable_setSessionModel(params: SetSessionModelRequest) { const session = this.sessionManager.get(params.sessionId) - const providers = await this.sdk.config + const providers: any[] = await this.sdk.config .providers({ directory: session.cwd }, { throwOnError: true }) - .then((x) => x.data!.providers) + .then((x: any) => x.data!.providers) const selection = parseModelSelection(params.modelId, providers) this.sessionManager.setModel(session.id, selection.model) diff --git a/packages/opencode/src/cli/cmd/run.ts b/packages/opencode/src/cli/cmd/run.ts index 8282244af03..f0ed5990000 100644 --- a/packages/opencode/src/cli/cmd/run.ts +++ b/packages/opencode/src/cli/cmd/run.ts @@ -374,7 +374,7 @@ export const RunCommand = cmd({ } async function session(sdk: OpencodeClient) { - const baseID = args.continue ? (await sdk.session.list()).data?.find((s) => !s.parentID)?.id : args.session + const baseID = args.continue ? (await sdk.session.list()).data?.find((s: any) => !s.parentID)?.id : args.session if (baseID && args.fork) { const forked = await sdk.session.fork({ sessionID: baseID }) @@ -392,7 +392,7 @@ export const RunCommand = cmd({ const cfg = await sdk.config.get() if (!cfg.data) return if (cfg.data.share !== "auto" && !Flag.OPENCODE_AUTO_SHARE && !args.share) return - const res = await sdk.session.share({ sessionID }).catch((error) => { + const res = await sdk.session.share({ sessionID }).catch((error: any) => { if (error instanceof Error && error.message.includes("disabled")) { UI.println(UI.Style.TEXT_DANGER_BOLD + "! " + error.message) } diff --git a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx index aa3fadba619..f21fd6e9c61 100644 --- a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx @@ -349,7 +349,7 @@ export function Session() { .share({ sessionID: route.sessionID, }) - .then((res) => copy(res.data!.share!.url)) + .then((res: any) => copy(res.data!.share!.url)) .catch(() => toast.show({ message: "Failed to share session", variant: "error" })) dialog.clear() },