From 8cad3086fa341e04b1883ceeafece12b99d56a16 Mon Sep 17 00:00:00 2001 From: Frank Date: Wed, 27 Aug 2025 18:23:28 -0400 Subject: [PATCH] sync --- github/src/opencode.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/github/src/opencode.ts b/github/src/opencode.ts index 4aacf5cea..b3cb7c166 100644 --- a/github/src/opencode.ts +++ b/github/src/opencode.ts @@ -2,6 +2,7 @@ import { spawn } from "node:child_process" import { lazy } from "./lazy" import { createOpencodeClient } from "@opencode-ai/sdk" import { Git } from "./git" +import { Auth } from "./auth" export namespace Opencode { const HOST = "127.0.0.1" @@ -56,6 +57,10 @@ export namespace Opencode { const session = await client() .session.create() .then((r) => r.data) + + // Add GH_TOKEN for llm to use `gh` cli + process.env["GH_TOKEN"] = await Auth.token() + const chat = await client().session.chat({ path: session, body: {