Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1812 commits
Select commit Hold shift + click to select a range
fd778e0
Support SDK transport on Windows
1jehuang Aug 25, 2026
cd9d366
fix(sdk): silence Windows launch warning
1jehuang Aug 25, 2026
b76f965
fix(swarm): make worker model operator-controlled
1jehuang Aug 26, 2026
8cbc4e8
test(sdk): verify swarm model launch fence
1jehuang Aug 26, 2026
ae06f0b
feat: support externally managed wake requests
1jehuang Aug 26, 2026
48714ce
release: prepare v0.81.0
1jehuang Aug 26, 2026
fdc1dde
Mark owned sessions crashed on client loss
1jehuang Aug 26, 2026
579e97b
style: apply rustfmt
1jehuang Aug 26, 2026
cfbf3d9
fix(protocol): wire disconnect crash flag
1jehuang Aug 26, 2026
181cfce
fix(protocol): update remaining subscribe clients
1jehuang Aug 26, 2026
cae6d2a
chore(release): prepare v0.81.1
1jehuang Aug 26, 2026
5f512b0
test(server): prove external wakes do not start turns
1jehuang Aug 26, 2026
98ae905
docs: update weekly stars chart
github-actions[bot] Aug 26, 2026
658d07c
Persist crashes before aborting disconnect cleanup
1jehuang Aug 26, 2026
7383091
fix telemetry activity undercounting
1jehuang Aug 26, 2026
d7433f9
track explicit in-app telemetry opt-outs
1jehuang Aug 26, 2026
63df310
render display math images inside lists
1jehuang Aug 26, 2026
4e712cd
test nested latex image resolution
1jehuang Aug 26, 2026
9e8d6e1
Avoid persisting untouched sessions
1jehuang Aug 26, 2026
5670e88
fix(tui): keep fork startup prompt visible
1jehuang Aug 26, 2026
5b7ab45
Fix session attachment identity corruption
1jehuang Aug 26, 2026
9536c21
fix(api): preserve per-connection session attachment
1jehuang Aug 26, 2026
26e73cf
test(api): cover attachment isolation through socket
1jehuang Aug 26, 2026
9ead528
docs: remove star history chart
1jehuang Aug 26, 2026
e287378
fix: fall back to USERPROFILE for Grok tokens (fixes #1072)
1jehuang Aug 27, 2026
f610a14
fix: preserve remote reasoning effort (fixes #1073)
1jehuang Aug 27, 2026
561f999
fix: preserve image input for named profiles (fixes #1050)
1jehuang Aug 27, 2026
2a29c36
fix: report the macOS config path correctly (fixes #1052)
1jehuang Aug 27, 2026
134b516
fix: use spinner fast path while tools run (fixes #1071)
1jehuang Aug 27, 2026
37902b6
fix: preserve Anthropic API-key model route (fixes #1068)
1jehuang Aug 27, 2026
ce51364
fix: route Copilot GPT-5.6 through responses (fixes #1060)
1jehuang Aug 27, 2026
8d6dec7
fix: refresh auth before catalog reload (fixes #1053)
1jehuang Aug 27, 2026
467623d
fix: preserve Mermaid diagrams in native tmux sixel (fixes #1051)
1jehuang Aug 27, 2026
10c26eb
docs: update weekly stars chart
github-actions[bot] Aug 27, 2026
a2b735a
feat(providers): add Belvedir inference support
1jehuang Aug 28, 2026
7f41808
fix(providers): complete Belvedir CLI routing
1jehuang Aug 28, 2026
13e9ece
fix(provider-doctor): support catalog-less Belvedir router
1jehuang Aug 28, 2026
a5f17d2
docs: update weekly stars chart
github-actions[bot] Aug 28, 2026
3f7d2dc
fix: honor Z.AI reasoning effort config (fixes #1084)
1jehuang Aug 28, 2026
0a66fbc
fix: preserve live headless workers during idle checks (fixes #1090)
1jehuang Aug 28, 2026
50559df
fix: sync compaction budget with provider changes (fixes #1086)
1jehuang Aug 28, 2026
eca777b
fix: honor explicit context window before profile fallback (fixes #1087)
1jehuang Aug 28, 2026
45c5469
feat: add Conifer provider integration (fixes #1089)
1jehuang Aug 28, 2026
26405d6
style: format provider triage fixes
1jehuang Aug 28, 2026
e24dd97
fix: list Conifer in provider discovery (fixes #1089)
1jehuang Aug 28, 2026
c6faca9
Merge pull request #1082 from 1jehuang/agent/triage-safe-fixes-20260827
1jehuang Aug 28, 2026
ba75909
docs: update weekly stars chart
github-actions[bot] Aug 29, 2026
c8c8455
fix(tui): resize and copy clicked mermaid diagrams
1jehuang Aug 29, 2026
48f8bd2
fix(tui): apply resize clicks to mermaid placeholders
1jehuang Aug 29, 2026
774d2a8
fix(tui): invalidate mermaid message cache on resize
1jehuang Aug 29, 2026
072b223
test(tui): cover mermaid resize cache invalidation
1jehuang Aug 29, 2026
4c49cca
fix(tui): fill resized mermaid placeholder
1jehuang Aug 29, 2026
677c7d2
fix(tui): skip duplicate inline image sizes
1jehuang Aug 29, 2026
ec80af3
chore(release): prepare v0.81.2
1jehuang Aug 29, 2026
f35401f
Fix cross-connection session attachment correlation
1jehuang Aug 29, 2026
a18af25
docs: update weekly stars chart
github-actions[bot] Aug 30, 2026
8e0d47e
fix macOS terminal window close handling
1jehuang Aug 29, 2026
c7afd66
Improve copy selection visibility
1jehuang Aug 29, 2026
a7766c3
style(tui): emphasize active tool details
1jehuang Aug 30, 2026
cda8a79
docs: add fork prompt session analysis
1jehuang Aug 30, 2026
1118fb2
docs: add illustrated portrait asset
1jehuang Aug 30, 2026
bbc47e6
test(tui): cover running tool detail emphasis
1jehuang Aug 30, 2026
008abc4
chore(release): prepare v0.81.3
1jehuang Aug 30, 2026
896f866
chore(release): prepare v0.81.4
1jehuang Aug 30, 2026
fbbde77
docs: update weekly stars chart
github-actions[bot] Aug 31, 2026
3252361
docs: update weekly stars chart
github-actions[bot] Sep 1, 2026
7bbceda
docs: update weekly stars chart
github-actions[bot] Sep 2, 2026
a170e98
docs: update weekly stars chart
github-actions[bot] Sep 3, 2026
5c88c3b
fix: update Claude OAuth client version (#1135)
1jehuang Sep 3, 2026
0a09152
fix: isolate git info cache in tests (fixes #1133) (#1136)
1jehuang Sep 3, 2026
3243be7
fix: preserve macOS Ctrl+5 prompt jump (fixes #1131) (#1137)
1jehuang Sep 3, 2026
97e35ea
fix: isolate sandboxed homes from Keychain (fixes #1132) (#1138)
1jehuang Sep 3, 2026
ef8a879
fix: clear inline images with session (fixes #1123) (#1139)
1jehuang Sep 3, 2026
8176169
fix: accept disabled failover aliases (fixes #1101) (#1140)
1jehuang Sep 3, 2026
6e41fd5
feat(anthropic): add claude-fable-5-1 to the direct Anthropic catalog…
1jehuang Sep 3, 2026
139bcf4
fix(openrouter): price @endpoint-pinned models from the pinned endpoi…
1jehuang Sep 2, 2026
b9cb0aa
feat(swarm): add agents.swarm_effort pin and show worker effort in sw…
1jehuang Sep 2, 2026
bfeb134
fix(auth-test): fail fast on hard usage-limit exhaustion instead of r…
1jehuang Sep 2, 2026
363372e
fix(session): persist sessions created with a title before the first …
1jehuang Sep 2, 2026
4187db8
test(tui-launch): canonicalize expected cwd in handterm spawn tests (…
1jehuang Sep 2, 2026
7f03f46
fix(server): hold the idle-agent reservation through the wake turn (f…
1jehuang Sep 2, 2026
081fccc
test(tui): only clear ambient state in the shared per-process test ho…
1jehuang Sep 2, 2026
53ffa32
feat(config): document agents.swarm_effort and add JCODE_SWARM_EFFORT…
1jehuang Sep 2, 2026
7064ae1
fix(server): hold the wake-turn reservation through the terminal stat…
1jehuang Sep 3, 2026
2d03590
Merge pull request #1166 from 1jehuang/triage/2026-09-02
1jehuang Sep 3, 2026
f46f9c3
chore(release): prepare v0.81.5
1jehuang Sep 3, 2026
1f7feb2
fix(openrouter-runtime): send x-opencode-session header to OpenCode e…
1jehuang Sep 4, 2026
345cba2
test(openrouter-runtime): wire-level check that x-opencode-session re…
1jehuang Sep 4, 2026
ad9cd59
Merge pull request #1172 from 1jehuang/fix/1167-opencode-session-header
1jehuang Sep 4, 2026
4f0f981
chore(release): prepare v0.81.6
1jehuang Sep 4, 2026
ff6fb63
docs: update weekly stars chart
github-actions[bot] Sep 4, 2026
00155ee
tui: carry attached images into /fork and /btw prompts
1jehuang Sep 4, 2026
fd5794a
Add gpt-6-astra to the OpenAI model catalog
1jehuang Sep 4, 2026
bb9c530
Make gpt-6-astra the default OpenAI model
1jehuang Sep 4, 2026
358226c
chore(release): prepare v0.81.7
1jehuang Sep 4, 2026
ffe90c4
fix: forward real compaction metrics on the remote turn path (fixes #…
1jehuang Sep 4, 2026
c0c3c96
feat(mcp): per-server timeout_secs for request replies (fixes #1174, …
1jehuang Sep 4, 2026
c379f2a
fix(swarm): report ignored per-spawn model instead of dropping it sil…
1jehuang Sep 4, 2026
f0f3f69
chore: clear macOS-only and Linux dead-code warnings (refs #1177)
1jehuang Sep 4, 2026
f9748d6
ci: enforce the zero-warning budget on macOS too (refs #1177)
1jehuang Sep 4, 2026
a0202d1
fix: repair relative architecture and plan documentation links (fixes…
1jehuang Sep 5, 2026
f11adb5
docs: update weekly stars chart
github-actions[bot] Sep 5, 2026
470d675
fix(tui): preserve live fast tier in catalog and reconnect snapshots
1jehuang Sep 5, 2026
458d543
fix(tui): scroll hovered diagrams independently of keyboard focus
1jehuang Sep 5, 2026
4437e10
feat(tui): enlarge panel images on click
1jehuang Sep 5, 2026
0fb8827
fix: only mark interrupted client sessions as crashed
1jehuang Sep 5, 2026
a5c8d8b
fix(memory): break batch and MCP registry reference cycles
1jehuang Sep 6, 2026
3073dfa
fix(tui): prefer color-coded token badges over patch line counts
1jehuang Sep 6, 2026
7d08697
feat(tui): compact pinned todos to a single summary row
1jehuang Sep 6, 2026
a843aa0
fix(memory): scope session tool policies to agent lifetime
1jehuang Sep 6, 2026
d5cdc51
test(tui): verify token badges through full terminal frames
1jehuang Sep 6, 2026
d937df2
fix(tui): keep first-prompt transition anchored to composer
1jehuang Sep 6, 2026
36a70f9
fix(tui): stop repeating unchanged ownership completion checks
1jehuang Sep 6, 2026
5d9f47a
fix(tui): revert green token badges and restore patch line counts
1jehuang Sep 6, 2026
fa193e6
fix(tui): revert first-prompt jump to top
1jehuang Sep 6, 2026
773c1ba
fix(api): preserve cwd when attaching sessions
1jehuang Sep 6, 2026
bbc9f6d
test(tui): anchor prompt spacing check below release notes
1jehuang Sep 6, 2026
60de75f
fix(api): attach with persisted session cwd
1jehuang Sep 6, 2026
1f5153e
test(openai): cover websocket prewarm runtime
1jehuang Sep 6, 2026
6780627
test(openai): isolate prewarm credentials and transport
1jehuang Sep 6, 2026
affd3c2
fix(tui): restore multi-row pinned todo cards
1jehuang Sep 6, 2026
29f7e5b
fix(auth): automatically show login QR when browser is suppressed
1jehuang Sep 6, 2026
b31b0c3
feat(provider): prewarm requests before context preparation
1jehuang Sep 6, 2026
d187377
feat(openai): prewarm Responses WebSocket v2 connections safely
1jehuang Sep 6, 2026
6e62033
docs: update weekly stars chart
github-actions[bot] Sep 6, 2026
e41c834
feat(swarm): restore per-worker model overrides
1jehuang Sep 6, 2026
c295d90
fix(auth): render QR in scriptable headless CLI login
1jehuang Sep 6, 2026
1ff6fad
feat(agent): start provider warmup on idle client subscription
1jehuang Sep 6, 2026
5dc8f31
test(tui): render todo regression with assistant transcript
1jehuang Sep 6, 2026
a495fb0
fix(openai): close prewarm locking and credential-send races
1jehuang Sep 6, 2026
777a4b6
test(tui): focus pinned todo regression on default card visibility
1jehuang Sep 6, 2026
047413d
test(tui): verify default todo cards across terminal widths
1jehuang Sep 6, 2026
b036f78
docs(openai): record measured prewarming latency benefit
1jehuang Sep 6, 2026
753f623
docs(openai): map v2 requirements to observed verification
1jehuang Sep 6, 2026
50d7f20
docs(openai): record whole-result verification rerun
1jehuang Sep 6, 2026
18c86f2
style: format server and TUI changes
1jehuang Sep 6, 2026
b6c8c47
perf(provider): prewarm newly connected idle sessions
1jehuang Sep 6, 2026
029074a
feat(api): support image interrupts and start idle sessions
1jehuang Sep 6, 2026
bdc865b
Merge remote-tracking branch 'origin/master'
1jehuang Sep 6, 2026
6971dff
chore(release): prepare v0.82.0
1jehuang Sep 6, 2026
9aaa0ad
fix(telemetry): quarantine legacy concurrency and add trusted reporting
1jehuang Sep 6, 2026
458af80
fix(telemetry): count live Agent sessions with crash-safe ownership
1jehuang Sep 6, 2026
0d6dd52
docs: record concurrency rollout validation and client release boundary
1jehuang Sep 6, 2026
82a93e6
fix(niri): forward Desktop session launch shortcuts
1jehuang Sep 6, 2026
8e9f404
fix: queue superseded telemetry off session creation path
1jehuang Sep 6, 2026
60aaa59
docs: record isolated session API latency verification
1jehuang Sep 6, 2026
797481a
feat(sdk): connect to native harnesses over system SSH
1jehuang Sep 6, 2026
9f47727
fix(tui): isolate SSH clients from local session state
1jehuang Sep 6, 2026
c0df74c
Guard SSH TUI commands and inputs from local side effects
1jehuang Sep 6, 2026
1e2c6de
feat(server): opt in to disconnected remote turn continuation
1jehuang Sep 6, 2026
080d56a
fix(tui): keep SSH file links and terminal metadata host-safe
1jehuang Sep 6, 2026
f8e1c49
Block SSH workspace commands that read laptop sessions
1jehuang Sep 6, 2026
d1887cb
fix(server): keep native capability probes on the subscribe stream
1jehuang Sep 6, 2026
b3e686e
Add native SSH transport with safe lifecycle and real CLI acceptance
1jehuang Sep 6, 2026
bb237b3
feat(cli): attach local TUI to a native server over SSH
1jehuang Sep 6, 2026
2e3029b
test(tui): construct SSH collision fixture as stored message
1jehuang Sep 6, 2026
a547c70
Observe native SSH adapter sockets without procfd access
1jehuang Sep 6, 2026
b082fb3
Exercise native SSH terminal-close cleanup via SIGHUP
1jehuang Sep 6, 2026
9853d8a
test(tui): include cache policy in SSH history fixture
1jehuang Sep 6, 2026
d0f607d
fix(tui): hide local provider and scheduler metadata over SSH
1jehuang Sep 6, 2026
50c1216
fix(tui): use only server-reported SSH model hints
1jehuang Sep 6, 2026
2961cef
test(tui): expose header composition within TUI for SSH regression
1jehuang Sep 6, 2026
48b9305
docs: record real native SSH and terminal-close acceptance
1jehuang Sep 6, 2026
83c5621
Isolate scriptable login flows and add race-safe scoped cancellation
1jehuang Sep 6, 2026
4e70099
fix: fork live empty sessions and persist linked children
1jehuang Sep 6, 2026
91394a5
feat(tui): authenticate remote SSH hosts with native private login flow
1jehuang Sep 6, 2026
92ccfd6
fix(tui): close SSH login cancellation result race and teardown gap
1jehuang Sep 6, 2026
9aba056
test: add isolated native SSH login acceptance harness
1jehuang Sep 6, 2026
ae8763c
fix(tui): retain private login input routing during SSH reconnect
1jehuang Sep 6, 2026
8d92992
test(tui): fix SSH login pending turn assertions
1jehuang Sep 6, 2026
29e32a4
test(tui): allow native login in SSH command safety assertions
1jehuang Sep 6, 2026
bf61b65
fix(tui): persist cancellation feedback for SSH login picker
1jehuang Sep 6, 2026
5ba5fee
test: synchronize SSH login error assertions with remote completion
1jehuang Sep 6, 2026
8d3d36e
fix: retain unsaved idle sessions across brief client reloads
1jehuang Sep 6, 2026
77430f0
docs: document verified native SSH login and credential boundaries
1jehuang Sep 6, 2026
3fb6134
fix: attach SDK clients to unsaved live sessions with authoritative cwd
1jehuang Sep 6, 2026
0f89418
test: cover private Claude SSH login begin and cancel
1jehuang Sep 6, 2026
41bb58f
test: isolate SSH login scenarios and await cancellation acknowledgement
1jehuang Sep 6, 2026
845625e
docs: record real Claude SSH login initiation acceptance
1jehuang Sep 6, 2026
1f9a56a
feat(auth): add built-in Novita API-key login
1jehuang Sep 6, 2026
e6458f1
test(tui): cover first-prompt visibility through processing frames
1jehuang Sep 6, 2026
ab15a28
Add consent-gated native SSH credential import
1jehuang Sep 6, 2026
aa5462d
feat(auth): add private stdin receiver for opt-in credential import
1jehuang Sep 6, 2026
6a3c05b
Add bounded opt-in OAuth credential transfer primitive
1jehuang Sep 6, 2026
c551ec5
test: cover synthetic native SSH credential import
1jehuang Sep 6, 2026
c5fdd27
Derive missing OpenAI transfer expiry from JWT claims
1jehuang Sep 6, 2026
33ec19f
fix(auth): reject invalid import arguments before startup side effects
1jehuang Sep 6, 2026
4bcbb8a
fix(server): preserve reasoning effort in model catalogs
1jehuang Sep 6, 2026
87aa975
fix(api): keep runtime identity and model catalogs current
1jehuang Sep 6, 2026
a922ab1
fix(sdk): route runtime and connection events by session
1jehuang Sep 6, 2026
fe66035
docs(ssh): explain consent-gated local login import
1jehuang Sep 6, 2026
1301e38
chore(release): prepare v0.83.0
1jehuang Sep 6, 2026
983b532
docs: record verified consent-gated SSH credential import
1jehuang Sep 6, 2026
1b99ae6
fix(sdk): gate Unix-only test fixtures on Unix
1jehuang Sep 7, 2026
00d3e70
feat(ssh): expose sanitized remote login picker status
1jehuang Sep 7, 2026
98db2a1
feat(tui): share remote login picker with explicit local imports
1jehuang Sep 7, 2026
157818d
test(ssh): cover pasted import picker filters
1jehuang Sep 7, 2026
8121beb
fix(ssh): keep pasted login choices in the active picker
1jehuang Sep 7, 2026
59550d9
docs: map remote login UX requirements to observed acceptance
1jehuang Sep 7, 2026
95a73b0
docs: record deployed credential receiver rejection checks
1jehuang Sep 7, 2026
9231375
Show model choices in command suggestions instead of a boxed picker
Sep 7, 2026
684d794
Track ChatGPT OAuth API-equivalent usage by account and local day
Sep 7, 2026
9e55226
Price current ChatGPT models and long-context OAuth usage accurately
Sep 7, 2026
3bacd90
fix(openai): terminate failed websocket continuations atomically
Sep 7, 2026
70cf17e
feat(ssh): offer local login import with explicit yes-no onboarding
1jehuang Sep 7, 2026
463ceff
Match SSH login picker and remote status to provider catalog
1jehuang Sep 7, 2026
97123ea
Cover remote catalog and import onboarding in SSH acceptance harnesses
1jehuang Sep 7, 2026
1ce0f6e
Treat unknown configured remote providers as unknown host state
1jehuang Sep 7, 2026
4a5fb0e
Make native SSH harness picker checks robust to differential redraws
1jehuang Sep 7, 2026
42fb5c6
test(ssh): repaint before waiting on login picker prompt
1jehuang Sep 7, 2026
57d5878
chore(release): v0.84.0
1jehuang Sep 7, 2026
daa31d5
docs: update weekly stars chart
github-actions[bot] Sep 7, 2026
f8ab48f
test(ssh): repaint periodically while waiting for async markers
1jehuang Sep 7, 2026
33d0f78
docs(ssh): record yes/no onboarding acceptance results
1jehuang Sep 7, 2026
f6764dd
Decode persisted reasoning markup for native frontends
Sep 7, 2026
fbed5b9
Preserve observer turn completion and reconnect activity in API bridge
Sep 7, 2026
dbda07b
fix: resolve known scratch paths in destructive command checks
Sep 7, 2026
b06ef5d
Preserve observer turn completion and reconnect activity in API bridge
Sep 7, 2026
fd90d08
fix(command-risk): distinguish read-only wrappers and find actions
Sep 7, 2026
e92bfb1
docs(ssh): distinguish deployed personal import from synthetic accept…
1jehuang Sep 7, 2026
ce700ff
fix(update): preserve development builds ahead of stable releases
1jehuang Sep 7, 2026
4e85d44
docs: update weekly stars chart
github-actions[bot] Sep 8, 2026
e65e47c
docs: update weekly stars chart
github-actions[bot] Sep 9, 2026
ce4e789
docs: update weekly stars chart
github-actions[bot] Sep 10, 2026
b823e26
docs: update weekly stars chart
github-actions[bot] Sep 11, 2026
33daef6
docs: update weekly stars chart
github-actions[bot] Sep 12, 2026
faa6be9
feat(sdk): add native cancellable OAuth login flows
Sep 12, 2026
950e231
Expose swarm ownership and lifecycle metadata in session SDK
Sep 12, 2026
10cf5c7
Expose swarm ownership and lifecycle metadata in session SDK
Sep 12, 2026
c86621c
fix: show launch hotkey notice only on first startup
Sep 12, 2026
6e8bf9f
fix(tui): preserve active turns across reconnect and continuation dis…
Sep 12, 2026
200b11e
fix: preserve restored image positions and batch attachments
jcode Sep 12, 2026
6ee9ce5
fix(sdk): preserve cache creation token usage
jcode Sep 12, 2026
827eee1
feat(sdk): expose durable per-turn history response stats
jcode Sep 12, 2026
fb4ee62
fix(harness): propagate attachment recovery directives to SDK clients
jcode Sep 12, 2026
ff32973
feat(runtime): share durable model route usage and picker ranking
jcode Sep 12, 2026
0a182a3
fix(sdk): submit recovery continuations as hidden system reminders
jcode Sep 12, 2026
31d14f8
feat(runtime): share durable model route usage and picker ranking
jcode Sep 12, 2026
641d6bc
fix(harness): retain hidden reminder plumbing across concurrent changes
jcode Sep 12, 2026
639459e
fix(openai): stream tool names and inputs before arguments complete
jcode Sep 12, 2026
6dcec68
fix(tui): keep resume preview left-aligned independently of chat
Sep 12, 2026
a6eab99
fix(tui): keep blockquote gutters continuous across paragraph breaks
jcode Sep 12, 2026
ea866b8
test(tui): verify continuous quote borders in terminal cells
jcode Sep 12, 2026
98990d4
Merge remote-tracking branch 'origin/master'
Sep 12, 2026
247dc00
test(api): account for native state requests in capability ledger
Sep 12, 2026
ea44b6d
docs: welcome pull requests from all contributors
Sep 13, 2026
f51d3ca
Merge pull request #1236 from 1jehuang/docs/welcome-all-contributors-…
1jehuang Sep 13, 2026
fc9ef83
fix: handle empty API session directories (fixes #1234)
1jehuang Sep 13, 2026
7f8447a
fix: forward OAuth Bash timeout and execution schema (fixes #1223)
1jehuang Sep 13, 2026
e2b9d7a
fix: retain image input for DeepSeek Flash models (fixes #1221)
1jehuang Sep 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
132 changes: 132 additions & 0 deletions .github/scripts/generate_star_history.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
#!/usr/bin/env python3
"""Generate a self-hosted cumulative GitHub stars chart for the README."""

from __future__ import annotations

import argparse
import datetime as dt
import json
import math
import os
import urllib.request
from pathlib import Path


def fetch_stars(repository: str, token: str) -> list[dt.date]:
url = f"https://api.github.com/repos/{repository}/stargazers?per_page=100"
dates: list[dt.date] = []
while url:
request = urllib.request.Request(
url,
headers={
"Accept": "application/vnd.github.star+json",
"Authorization": f"Bearer {token}",
"User-Agent": "jcode-star-history",
"X-GitHub-Api-Version": "2022-11-28",
},
)
with urllib.request.urlopen(request) as response:
for star in json.load(response):
dates.append(dt.datetime.fromisoformat(star["starred_at"].replace("Z", "+00:00")).date())
links = response.headers.get("Link", "")
url = ""
for link in links.split(","):
if 'rel="next"' in link:
url = link[link.index("<") + 1 : link.index(">")]
break
return dates


def week_start(day: dt.date) -> dt.date:
"""Return the Monday containing ``day``."""
return day - dt.timedelta(days=day.weekday())


def render_svg(repository: str, dates: list[dt.date], today: dt.date | None = None) -> str:
if not dates:
raise RuntimeError("GitHub returned no stargazers")
today = today or dt.date.today()
dates.sort()
current_week = week_start(today)
weeks = [current_week - dt.timedelta(weeks=week) for week in reversed(range(26))]
values = [sum(day <= min(week + dt.timedelta(days=6), today) for day in dates) for week in weeks]
weekly = [
sum(week <= day <= min(week + dt.timedelta(days=6), today) for day in dates)
for week in weeks
]

width, height = 800, 420
left, right, top, bottom = 68, 24, 78, 64
plot_w, plot_h = width - left - right, height - top - bottom
latest = values[-1]
magnitude = 10 ** max(0, len(str(latest)) - 2)
step = max(magnitude, math.ceil(latest / 4 / magnitude) * magnitude)
grid_max = max(step * 4, 4)

def x(index: int) -> float:
return left + index * plot_w / (len(weeks) - 1)

def y(value: int) -> float:
return top + (1 - value / grid_max) * plot_h

y_ticks = []
for index in range(5):
value = step * index
yy = y(value)
label = f"{value / 1000:g}k" if value >= 1000 else str(value)
y_ticks.append(f'<line x1="{left}" y1="{yy:.1f}" x2="{width-right}" y2="{yy:.1f}" class="grid"/><text x="{left-12}" y="{yy+5:.1f}" text-anchor="end">{label}</text>')

points = " ".join(f"{x(index):.1f},{y(value):.1f}" for index, value in enumerate(values))
area = f"{left},{top + plot_h:.1f} {points} {width-right},{top + plot_h:.1f}"
x_ticks = []
dots = []
for index, (week, value, gain) in enumerate(zip(weeks, values, weekly)):
if index % 4 == 0 or index == len(weeks) - 1:
x_ticks.append(f'<text x="{x(index):.1f}" y="{height-30}" text-anchor="middle">{week:%b %-d}</text>')
current = " current" if week == current_week else ""
radius = 5 if current else 3
dots.append(
f'<circle class="point{current}" cx="{x(index):.1f}" cy="{y(value):.1f}" r="{radius}">'
f'<title>{week:%b %-d}: {value:,} total stars (+{gain:,} that week)</title></circle>'
)

return f'''<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 {width} {height}" role="img" aria-labelledby="title desc">
<title id="title">{repository} cumulative GitHub stars over time</title>
<desc id="desc">Cumulative GitHub stars sampled weekly over the last 26 weeks, ending at {latest:,} stars.</desc>
<style>
:root {{ color-scheme: light dark; }}
.bg {{ fill: #fff; }} text {{ fill: #57606a; font: 13px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }}
.grid {{ stroke: #d8dee4; stroke-width: 1; }}
.area {{ fill: #2f81f7; fill-opacity: .14; }} .line {{ fill: none; stroke: #2f81f7; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }}
.point {{ fill: #fff; stroke: #2f81f7; stroke-width: 2; }} .point.current {{ fill: #2f81f7; stroke: #fff; stroke-width: 2; }}
.heading {{ fill: #24292f; font-size: 17px; font-weight: 600; }} .metric {{ fill: #24292f; font-size: 18px; font-weight: 600; }}
@media (prefers-color-scheme: dark) {{ .bg {{ fill: #0d1117; }} text {{ fill: #8b949e; }} .grid {{ stroke: #30363d; }} .area {{ fill: #58a6ff; fill-opacity: .16; }} .line {{ stroke: #58a6ff; }} .point {{ fill: #0d1117; stroke: #58a6ff; }} .point.current {{ fill: #58a6ff; stroke: #0d1117; }} .heading,.metric {{ fill: #f0f6fc; }} }}
</style>
<rect class="bg" width="100%" height="100%" rx="6"/>
<text class="heading" x="{left}" y="28">GitHub stars over time</text>
<text x="{left}" y="51">Cumulative stars · weekly sampling · last 26 weeks</text>
<text class="metric" x="{width-right}" y="28" text-anchor="end">{latest:,} stars</text>
<text x="{width-right}" y="51" text-anchor="end">+{weekly[-1]:,} this week so far</text>
{''.join(y_ticks)}
<polygon class="area" points="{area}"/>
<polyline class="line" points="{points}"/>
{''.join(dots)}
{''.join(x_ticks)}
</svg>
'''


def main() -> None:
parser = argparse.ArgumentParser()
parser.add_argument("--repo", default="1jehuang/jcode")
parser.add_argument("--output", type=Path, default=Path("docs/images/star-history.svg"))
args = parser.parse_args()
token = os.environ.get("GITHUB_TOKEN") or os.environ.get("GH_TOKEN")
if not token:
raise SystemExit("GITHUB_TOKEN or GH_TOKEN is required")
args.output.parent.mkdir(parents=True, exist_ok=True)
args.output.write_text(render_svg(args.repo, fetch_stars(args.repo, token)))


if __name__ == "__main__":
main()
Loading
Loading