Skip to content

sync(upstream): 5 commits from upstream - #10

Merged
clyang82 merged 6 commits into
mainfrom
sync/upstream-6e1ef7e0e418-219824a41f2d
Aug 12, 2026
Merged

clyang82 merged 6 commits into
mainfrom
sync/upstream-6e1ef7e0e418-219824a41f2d

Conversation

@clyang82

Copy link
Copy Markdown

Upstream Sync: 5 Commits

Upstream Commits

SHA Intent Type Risk
6e1ef7e0e418 Fix release bot failing to find merged PRs: handle trailing 'Z' in ISO dates on Python <3.11 and read merged_at from the nested pull_request object in GitHub search API results (top-level merged_at is always null). bugfix low
d6ddf9238773 Adds GitHub Copilot as a subscription-backed LLM provider: GitHub device-flow OAuth yields a long-lived token exchanged for a short-lived Copilot bearer that drives an OpenAI-compatible chat endpoint, with device-code sign-in UX in the /models selector and supporting fixes to credential retention, spinner/code placement, and shared helpers. feature medium
4f1065119eb9 Add a /context TUI slash command that renders a stacked bar and per-category breakdown of what fills the context window (system prompt, tools, MCP tools, skills, memory, messages), using the provider's measured prompt size as the total, an exact system+tools count derived from Anthropic's prompt-cache prefix when applicable (with 2x disagreement fallback), and a BPE pre-token-run-based estimator for the remaining split. feature medium
0a3d02162a67 Make the release bot commit as github-actions[bot] and add a Signed-off-by trailer (-s) so release PRs pass the DCO check. internal low
219824a41f2d Release chore: bump version from 1.22.2 to 1.22.3 and add a CHANGELOG entry summarizing previously-merged PRs (new /context command, GitHub Copilot provider, CI/release-bot fixes); no functional code changes. internal low

Affected Surfaces

  • /context slash command
  • /models provider-selector device-code sign-in flow
  • agent.BuildParams.System() / promptParams()
  • anthropic client CachesToolsAndSystemPrompt()
  • internal/llm/copilot (new registered provider package)
  • internal/llm/copilot/oauth (device flow, MintBearer, Token)
  • kit token-run estimator (token.go)
  • kit.FormatAlignedRow
  • llm types: prompt-cache token usage fields
  • llm.LoginPrompt
  • llm.NewRequestID
  • openaicompat.ChatStreamConfig.RequestOptions
  • proc.OpenURL
  • reminder package system-reminder tag consts/Pattern

Transformations Applied

Downstream File Confidence Notes
.github/scripts/release-bot.py high upstream diff applied directly via git apply
README.md high upstream diff applied directly via git apply
README.zh.md high upstream diff applied directly via git apply
docs/reference/package-map.md high upstream diff applied directly via git apply
internal/app/input/on_provider.go high upstream diff applied directly via git apply
internal/app/input/on_provider_auth.go high upstream diff applied directly via git apply
internal/app/input/on_provider_data.go high upstream diff applied directly via git apply
internal/app/input/on_provider_test.go high upstream diff applied directly via git apply
internal/app/input/on_provider_view.go high upstream diff applied directly via git apply
internal/llm/auth.go high upstream diff applied directly via git apply
internal/llm/auth_test.go high upstream diff applied directly via git apply
internal/llm/copilot/catalog.go high upstream diff applied directly via git apply
internal/llm/copilot/catalog_test.go high upstream diff applied directly via git apply
internal/llm/copilot/client.go high upstream diff applied directly via git apply
internal/llm/copilot/client_test.go high upstream diff applied directly via git apply
internal/llm/copilot/oauth/device.go high upstream diff applied directly via git apply
internal/llm/copilot/oauth/device_test.go high upstream diff applied directly via git apply
internal/llm/copilot/oauth/token.go high upstream diff applied directly via git apply
internal/llm/copilot/oauth/token_test.go high upstream diff applied directly via git apply
internal/llm/copilot/subscription.go high upstream diff applied directly via git apply
internal/llm/ids.go high upstream diff applied directly via git apply
internal/llm/openai/oauth/oauth.go high upstream diff applied directly via git apply
internal/llm/openai/oauth/token.go high upstream diff applied directly via git apply
internal/llm/openai/subscription.go high upstream diff applied directly via git apply
internal/llm/openaicompat/stream.go high upstream diff applied directly via git apply
internal/llm/types.go high upstream diff applied directly via git apply
internal/proc/browser.go high upstream diff applied directly via git apply
internal/proc/doc.go high upstream diff applied directly via git apply
cmd/cube/main.go medium The apply failed because cmd/san/main.go does not exist downstream: rename commit 10cfaec moved the CLI entrypoint to cmd/cube/main.go. Per the fork conventions the Go module path and all import paths remain github.com/genai-io/san/... verbatim, so the copilot blank import is spelled identically to upstream. I retargeted the mapped file cmd/cube/main.go and inserted _ "github.com/genai-io/san/internal/llm/copilot" in the provider blank-import block, alphabetically between bigmodel and custom, exactly matching upstream's placement. The downstream file contents were empty in the prompt (the given path doesn't exist), so the anchor block is inferred from the upstream diff context plus the conventions' guarantee that the codebase is functionally identical apart from branding — hence medium confidence. Do NOT create cmd/san/main.go; that would re-add a stale pre-rename path. (applied 1 targeted edits)
docs/guides/getting-started.md high The upstream hunk failed only because the anchor line references ~/.cube/providers.json downstream (vs ~/.san upstream). Inserted the new subscription-provider paragraph at the same location, adapting the product name 'San opens the browser' to 'Cube opens the browser' per the fork's branding-rename convention. No other changes needed. (applied 1 targeted edits)
internal/agent/build.go high upstream diff applied directly via git apply
internal/agent/session.go high upstream diff applied directly via git apply
internal/app/agent.go high upstream diff applied directly via git apply
internal/app/context_usage.go high upstream diff applied directly via git apply
internal/app/context_usage_test.go high upstream diff applied directly via git apply
internal/app/conv/context_usage.go high upstream diff applied directly via git apply
internal/app/conv/context_usage_test.go high upstream diff applied directly via git apply
internal/app/env.go high upstream diff applied directly via git apply
internal/app/input/slash_command.go high upstream diff applied directly via git apply
internal/app/kit/token.go high upstream diff applied directly via git apply
internal/app/kit/token_test.go high upstream diff applied directly via git apply
internal/app/kit/util.go high upstream diff applied directly via git apply
internal/app/model_agent_events.go high upstream diff applied directly via git apply
internal/app/model_session.go high upstream diff applied directly via git apply
internal/app/update_command.go high upstream diff applied directly via git apply
internal/command/registry.go high upstream diff applied directly via git apply
internal/llm/anthropic/client.go high upstream diff applied directly via git apply
internal/llm/types.go high upstream diff applied directly via git apply
internal/reminder/reminder.go high upstream diff applied directly via git apply
internal/reminder/reminder_test.go high upstream diff applied directly via git apply
internal/session/message_convert.go high upstream diff applied directly via git apply
docs/reference/slash-commands.md high The apply failed only because downstream renamed SAN.md to CUBE.md in the nearby /init row, shifting hunk context. The added lines themselves contain no san/cube branding, so they are inserted verbatim: the /context table row between /tokenlimit and /compact, and the /context bullet between the /think and /loop bullets in UI Interactions. Both anchor blocks are unique in the file. (applied 2 targeted edits)
.github/scripts/release-bot.py high The apply failed because the fork renamed the bot identity from 'san-release-bot[bot]' to 'cube-release-bot[bot]' (and cmd/san/main.go to cmd/cube/main.go) in the same hunk. The upstream change replaces that identity entirely with github-actions[bot], so the branding rename is moot here — the whole point of the upstream commit is to stop using a per-repo fake bot identity and use the real github-actions[bot] noreply email (which is identical across repos, no fork-specific adaptation needed). Applied verbatim: new explanatory comment, github-actions[bot] user.name/user.email, and the -s flag on git commit. Downstream-specific 'cmd/cube/main.go' path in git add is preserved. (applied 1 targeted edits)
CHANGELOG.md high upstream diff applied directly via git apply

⚠️ Conflicts

  • cmd/cube/main.go (): LLM edits did not apply: edit 1: 'old' block not found in file: 'var version = "1.22.2"'

❌ Unresolved Build Failures

  • cmd/cube/main.go: LLM edits did not apply: edit 1: 'old' block not found in file: 'var version = "1.22.2"' — Suggestion: Resolve manually — see the conflict summary in this PR.

🤖 Created by upstream-semantic-sync

…ailing 'Z' in ISO dates on Python <3.11 and read merged_at from the nested pull_request object in GitHub search API results (top-level merged_at is always null).

Upstream-commit: 6e1ef7e
…ider: GitHub device-flow OAuth yields a long-lived token exchanged for a short-lived Copilot bearer that drives an OpenAI-compatible chat endpoint, with device-code sign-in UX in the /models selector and supporting fixes to credential retention, spinner/code placement, and shared helpers.

Upstream-commit: d6ddf92
…ed bar and per-category breakdown of what fills the context window (system prompt, tools, MCP tools, skills, memory, messages), using the provider's measured prompt size as the total, an exact system+tools count derived from Anthropic's prompt-cache prefix when applicable (with 2x disagreement fallback), and a BPE pre-token-run-based estimator for the remaining split.

Upstream-commit: 4f10651
…d add a Signed-off-by trailer (-s) so release PRs pass the DCO check.

Upstream-commit: 0a3d021
… add a CHANGELOG entry summarizing previously-merged PRs (new /context command, GitHub Copilot provider, CI/release-bot fixes); no functional code changes.

Upstream-commit: 219824a
@clyang82
clyang82 merged commit 4edf571 into main Aug 12, 2026
2 checks passed
@clyang82
clyang82 deleted the sync/upstream-6e1ef7e0e418-219824a41f2d branch August 12, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant