diff --git a/packages/opencode/src/plugin/index.ts b/packages/opencode/src/plugin/index.ts index d47acd53f97..6c4c3a8081e 100644 --- a/packages/opencode/src/plugin/index.ts +++ b/packages/opencode/src/plugin/index.ts @@ -19,7 +19,7 @@ import { gitlabAuthPlugin as GitlabAuthPlugin } from "opencode-gitlab-auth" import { PoeAuthPlugin } from "opencode-poe-auth" import { CloudflareAIGatewayAuthPlugin, CloudflareWorkersAuthPlugin } from "./cloudflare" import { AzureAuthPlugin } from "./azure" -import { XaiAuthPlugin } from "./xai" +import { XaiAuthPlugin } from "./xai" // kilocode_change import { Effect, Layer, Context, Stream } from "effect" import { EffectBridge } from "@/effect/bridge" import { InstanceState } from "@/effect/instance-state" diff --git a/packages/opencode/src/plugin/xai.ts b/packages/opencode/src/plugin/xai.ts index 5885bd464e4..c05903530b0 100644 --- a/packages/opencode/src/plugin/xai.ts +++ b/packages/opencode/src/plugin/xai.ts @@ -1,3 +1,4 @@ +// kilocode_change - new file import type { Hooks, PluginInput } from "@kilocode/plugin" // kilocode_change import * as Log from "@opencode-ai/core/util/log" import { OAUTH_DUMMY_KEY } from "../auth" @@ -109,7 +110,7 @@ function authHeaders() { return { "Content-Type": "application/x-www-form-urlencoded", Accept: "application/json", - "User-Agent": `opencode/${InstallationVersion}`, + "User-Agent": `kilocode/${InstallationVersion}`, } } @@ -141,7 +142,7 @@ export function buildAuthorizeUrl( ): string { // `plan=generic` opts the consent screen into xAI's generic OAuth plan tier; // without it, accounts.x.ai rejects loopback OAuth from non-allowlisted - // clients. `referrer=opencode` lets xAI attribute opencode-originated + // clients. `referrer=kilocode` lets xAI attribute kilocode-originated // logins in their OAuth server logs (best-effort attribution while we // continue to reuse the Grok-CLI client_id). const params = new URLSearchParams({ @@ -154,7 +155,7 @@ export function buildAuthorizeUrl( state, nonce, plan: "generic", - referrer: "opencode", + referrer: "kilocode", }) return `${options.authorizeUrl ?? AUTHORIZE_URL}?${params.toString()}` } @@ -306,7 +307,7 @@ export async function pollDeviceCodeToken( const HTML_SUCCESS = ` - Kilo - xAI Authorization Successful + Kilocode - xAI Authorization Successful