Commit graph

168 commits

Author SHA1 Message Date
_Kerman
dff9fd4e32
chore: use raw query imports for prompt sources (#682) 2026-06-12 11:47:44 +08:00
_Kerman
2f7218cba4
test: fix resume test assertions for compaction replay records (#681) 2026-06-12 11:32:30 +08:00
Haozhe
c39c62590d
feat(skill): qualify sub-skill names with parent prefix (#651)
* feat(skill): qualify sub-skill names with parent prefix

- qualify sub-skill names with parent prefix and set isSubSkill metadata\n- hide sub-skills from the model skill listing
- expose sub-skills as dotted slash commands in TUI
- update slash command docs for English and Chinese
- align built-in sub-skill local names with their directories
2026-06-12 11:12:52 +08:00
_Kerman
911e7c3fcf
fix: replay compaction records on resume (#617) 2026-06-12 11:10:52 +08:00
_Kerman
dcf30754d0
feat: stream shell tool output (#676) 2026-06-12 11:10:20 +08:00
github-actions[bot]
0a3e87f05a
ci: release packages (#629)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-12 10:54:44 +08:00
liruifengv
596cadd465
feat: support always-thinking models via supports_thinking_type (#662)
Some checks are pending
CI / build (push) Waiting to run
CI / test (push) Waiting to run
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
Nix Build / Check flake.nix workspace sync (push) Waiting to run
Nix Build / nix build .#kimi-code (push) Blocked by required conditions
Release / Release (push) Waiting to run
Release / Deploy docs (push) Blocked by required conditions
Release / Native release artifact (push) Blocked by required conditions
Release / Publish native release assets (push) Blocked by required conditions
Map the /models three-state supports_thinking_type field ('only' /
'no' / 'both', taking precedence over the legacy supports_reasoning
boolean) onto the existing always_thinking capability:

- oauth: parse the field in both /models parsers; 'only' emits
  always_thinking alongside thinking, 'no' suppresses thinking even
  when supports_reasoning is set, absent falls back to the legacy
  boolean. Default thinking selection is forced on for 'only' (and
  off for 'no') models during login and provider refresh
- TUI: render the thinking control with a fixed On/Off layout — locked
  models show a greyed-out "Off (Unsupported)" segment, and
  non-thinking models mirror the style with "On (Unsupported)"
- agent-core: clamp thinkingLevel at the getter so a stale
  thinking-off config can never reach the request builder, status
  events, or subagent inheritance
- acp-adapter: derive alwaysThinking from capabilities, collapse the
  thinking select to a single locked "on" entry, and ignore off
  requests for locked models while re-emitting the snapshot
2026-06-11 23:16:02 +08:00
liruifengv
1e2e679693
feat: add tips banner below welcome panel on startup (#655)
Some checks are pending
CI / build (push) Waiting to run
CI / test (push) Waiting to run
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
Nix Build / Check flake.nix workspace sync (push) Waiting to run
Nix Build / nix build .#kimi-code (push) Blocked by required conditions
Release / Release (push) Waiting to run
Release / Deploy docs (push) Blocked by required conditions
Release / Native release artifact (push) Blocked by required conditions
Release / Publish native release assets (push) Blocked by required conditions
* chore: ignore .worktrees directory

* feat: add tips banner below welcome panel on startup

- Fetch active/fallback tips from the configured CDN with a 3s timeout.

- Filter tips by semver, client version, and date range.

- Render the banner directly below the welcome panel on startup/resume.

- Support tag, multi-line text, subtext, automatic wrapping, and narrow-terminal safety.

* refactor(tui): use theme color methods in banner component

Replace raw chalk calls with currentTheme helpers: tag uses
boldFg('primary'), main text uses boldFg('textStrong'), and subtext
uses fg('textDim') without stacking the dim modifier on the already
dim shade. Strengthen tests to assert the exact themed ANSI output.
2026-06-11 22:20:31 +08:00
7Sageer
0927f79883
fix: cancel active turns during session shutdown (#661)
* fix: cancel active turns during session shutdown

* fix: preserve background agents during session close
2026-06-11 20:52:50 +08:00
_Kerman
a2c5e1be25
fix: add minor improvements for Mira (#649) 2026-06-11 15:50:33 +08:00
_Kerman
54302ad612
fix: scope interactive agent requests (#648) 2026-06-11 15:37:09 +08:00
_Kerman
1b58aa8cdf
fix: allow YOLO when starting swarm tasks (#645) 2026-06-11 14:34:35 +08:00
qer
71f5926d0e
feat(datasource): add yuandian_law legal data source + request-id trace (#611)
Some checks are pending
CI / build (push) Waiting to run
CI / test (push) Waiting to run
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
Nix Build / Check flake.nix workspace sync (push) Waiting to run
Nix Build / nix build .#kimi-code (push) Blocked by required conditions
Release / Release (push) Waiting to run
Release / Deploy docs (push) Blocked by required conditions
Release / Native release artifact (push) Blocked by required conditions
Release / Publish native release assets (push) Blocked by required conditions
- Register the yuandian_law (元典法律数据库) data source for Chinese
  laws/regulations and judicial case search.
- Append a request-id / tool-call-id trace line to every tool result so
  failures can be correlated with backend logs.
- Fix the documented MCP tool names in SKILL.md (-data -> _data).
- Also includes the dev marketplace-server env isolation fix in dev.mjs.

Co-authored-by: qer <Anna_Knapprfr@mail.com>
2026-06-10 22:29:51 +08:00
liruifengv
296142544e
feat: alias search and two-line descriptions for slash command autocomplete (#631)
* feat: search slash command aliases in autocomplete

Slash-command name completion now matches aliases and shows them in the
label as `name (alias1, alias2)` when the match came from an alias.
Argument completion resolves aliases too. The intercepted completion
keeps the inner provider's conventions: argument hints stay in the
suggestion description, and primary-name matches outrank alias matches
on score ties.

* feat: wrap autocomplete descriptions onto up to two lines

Long slash command / skill descriptions used to be truncated to a single
line in the completion menu. CustomEditor now swaps the slash menu's list
for a WrappingSelectList that wraps descriptions to at most two lines,
ellipsizing past the second; non-slash completion keeps pi-tui's
single-line list.

Plain-text truncations also strip the trailing ANSI reset that pi-tui's
truncateToWidth appends — embedded inside the theme colouring it reset
the rest of the row, so a selected row with a truncated name rendered
its two description lines in different colours.

* chore: make changeset wording user-facing

* style: pass optional description directly instead of conditional spread

Follows the AGENTS.md convention for optional object properties.
2026-06-10 21:26:36 +08:00
github-actions[bot]
ecc0496115
ci: release packages (#621)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-10 18:31:01 +08:00
github-actions[bot]
3f9226f014
ci: release packages (#608)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-10 15:11:40 +08:00
liruifengv
1fbe0e4ee8
fix: truncate goal marker text to terminal width (#619) 2026-06-10 15:09:33 +08:00
_Kerman
494554eac5
feat: add undo selector (#615) 2026-06-10 14:22:02 +08:00
7Sageer
1580f35136
fix: align datasource plugin environment (#595)
* fix: align datasource plugin environment

* refactor: inject managed Kimi env into all stdio plugins

Pin the datasource credential-name test to the canonical
resolveKimiCodeOAuthKey so a digest drift in the standalone plugin
fails CI, and drop the hardcoded plugin-name special case so every
stdio plugin receives the active managed Kimi base URL / OAuth host
consistently (process.env and KIMI_CODE_HOME are already shared with
all plugins).
2026-06-10 12:42:27 +08:00
github-actions[bot]
25cf13ac97
ci: release packages (#588)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-10 10:47:32 +08:00
qer
40506f49d6
feat(tui): show available plugin updates in the marketplace (#593)
Installed plugins whose marketplace version is newer than the local
version now render an `update <local> → <latest>` badge and update in
place on Enter; up-to-date plugins show `installed · v<version>`.

Dev-server and CDN-build marketplace generation now stamp each entry's
version from the plugin manifest so the advertised "latest" stays accurate.
Adds a pure computeUpdateStatus() (semver, no spurious downgrades) with tests.

Co-authored-by: qer <Anna_Knapprfr@mail.com>
2026-06-09 21:28:36 +08:00
7Sageer
e48234af57
fix: avoid Windows command shim launches (#591) 2026-06-09 20:20:44 +08:00
liruifengv
f2863af267
fix: keep login fallback prompt visible (#594) 2026-06-09 20:06:07 +08:00
liruifengv
0abde8662a
fix(tui): clarify grouped subagent progress (#587) 2026-06-09 19:21:46 +08:00
liruifengv
f863127ab7
feat: custom color themes (#484)
* Refactor theme

* custom theme support

* docs: add custom themes guide

Document the custom theme file location, the color token reference, selecting a theme via /theme and tui.toml, and fallback behavior. Link it from the customization sidebar and the tui.toml theme field.

* feat(skill): add built-in custom-theme skill

Guides the model (or a manual /custom-theme run) to author a theme JSON in ~/.kimi-code/themes/: docs token reference, deliberate color choices, hex validation, and how to apply via /theme or /reload-tui. Note in the write-tui skill to keep the token set in sync across colors.ts, the schema, the docs, and this skill. Enrich the custom-theme changeset to cover all three usage paths.

* chore: remove theme research report

* fix(tui): resolve lint errors after main merge

Remove unused chalk/currentTheme/ResolvedTheme imports left by the theme refactor; break the theme <-> pi-tui-theme import cycle by dropping the markdown/editor theme getters from the Theme class (consumers call createMarkdownTheme directly); fix unused vars/params, a floating promise, and a redundant union type.

* fix(tui): address custom theme review feedback

- await applyTheme before refreshing terminal theme tracking, so
  switching to "auto" installs the watcher against the new state
- invalidate the transcript on automatic (terminal-driven) theme
  changes so already-rendered entries repaint
- rebuild UsagePanel bodies on invalidate (previously a no-op); /usage,
  /status, /mcp and /plugins now repaint on a theme switch
- repaint the compaction header on invalidate
- validate a custom theme before applying it from the /theme picker
- hide reserved dark/light/auto names from the custom theme list
- escape the theme name when writing tui.toml
- stop the custom theme loader writing warnings to the raw terminal
- remove a stray hello.ts

* refactor(tui): polish custom theme feature

- footer and todo-panel read the currentTheme singleton directly at
  render time instead of caching a palette copy; drop their setColors
  methods and the manual setColors calls on every theme change
- support "base": "dark" | "light" in custom theme files so a partial
  light theme inherits the light palette for unspecified tokens
- reconcile the docs and the custom-theme skill with the silent
  invalid-color fallback (no terminal warning)

* refactor(tui): live-repaint the agent swarm progress panel

Read the currentTheme palette through a getter instead of caching it at
construction time, so the swarm progress panel recolors on a theme switch
like the rest of the transcript. Drops the now-unused `colors` option.

* chore: remove plan.md

* docs: update custom theme guide

* docs: document custom theme skill command

* fix(skill): make custom theme user-triggered only
2026-06-09 18:55:15 +08:00
liruifengv
7cb4a23e01
fix: truncate queued messages to a single line (#586) 2026-06-09 17:26:41 +08:00
github-actions[bot]
c79972c28c
ci: release packages (#585)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-09 17:02:42 +08:00
github-actions[bot]
20f7aa337a
ci: release packages (#491)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-09 11:54:52 +08:00
Luyu Cheng
41ebe9fb9f
fix: polish goal lifecycle messaging (#555) 2026-06-09 11:47:00 +08:00
liruifengv
d7407b0ecf
feat: release experimental features (#569)
* feat: release experimental features

* refactor: remove redundant goal runtime gate

* refactor: remove unused skill flag plumbing

* feat: keep micro compaction opt-out
2026-06-09 11:42:50 +08:00
_Kerman
db82e33a20
fix: restore goal resume state from agent records (#552) 2026-06-09 10:02:19 +08:00
liruifengv
3765a49163
feat: rework TUI file references (#547)
* feat: rework TUI file references

* fix: respect fd file reference filtering

* chore: adjust file reference changeset

* fix: harden fd helper downloads

* fix: avoid symlink recursion in file fallback
2026-06-08 20:48:56 +08:00
Haozhe
879a7eeb33
fix(acp): restore legacy permission compatibility and stabilize ACP (#395)
* feat(acp-adapter): support embedded resource prompts

- advertise embeddedContext support in ACP capabilities and docs
- convert file:// resource_link blocks into decoded paths with optional line ranges
- keep XML wrappers for non-file or unparseable resource_link URIs
- update adapter tests for the new resource link behavior

* feat(acp-adapter): add ACP built-in slash command routing and UNC path support

- add local execution for /compact, /status, /usage, /mcp, /tasks, /help in ACP sessions
- surface unknown slash commands as local errors instead of forwarding to model\n- export ACP_BUILTIN_SLASH_COMMANDS from acp-adapter for CLI reuse
- fix file:// URI conversion for Windows UNC paths
- rebuild agent builtin tools on session tool kaos rebind
2026-06-08 19:27:20 +08:00
MicroGrey
3787c3016a
fix(tui): support exit shortcuts in startup session picker (#473)
* fix(tui): support exit shortcuts in startup session picker

* fix(tui): clear picker exit confirmation on close

---------

Co-authored-by: liruifengv <liruifeng1024@gmail.com>
2026-06-08 17:02:16 +08:00
liruifengv
2db1bd9675
fix(tui): subagent thinking text and tool output display (#541) 2026-06-08 16:19:15 +08:00
Davy
b47734ca0b
docs: add Homebrew installation (#531)
* docs: add Homebrew installation instructions

Add Homebrew as an installation option for macOS/Linux users in both
English and Chinese READMEs.

Closes #130

* feat(cli): detect Homebrew installs and use brew upgrade for updates

When kimi-code is installed via Homebrew, the update system now detects
the installation source and uses 'brew upgrade kimi-code' instead of
falling back to 'npm install -g'. This prevents duplicate installations
when Homebrew users receive update prompts.

* chore: add changeset for Homebrew update detection

* fix(cli): tighten Homebrew detection and disable auto-update

- Only match /cellar/ path segment (not /homebrew/) to avoid false
  positives on Apple Silicon where npm global installs live under
  /opt/homebrew/lib/node_modules/
- Disable background auto-update for Homebrew: brew upgrade may mutate
  dependents silently and the formula can lag behind CDN releases

* fix(cli): add homebrew to InstallSource Zod schema

Keeps the persistence schema in sync with the TypeScript type. Currently
harmless since Homebrew auto-install is disabled, but prevents a silent
state reset if it is ever enabled later.

---------

Co-authored-by: liruifengv <liruifeng1024@gmail.com>
2026-06-08 16:11:31 +08:00
liruifengv
b785e2698a
feat: show full plan cards (#536)
* feat: show full plan cards

* chore: patch plan card changeset
2026-06-08 15:35:49 +08:00
Qkunio
0fe13173f4
fix: handle windows session workdir separators (#486)
* fix: handle windows session workdir separators

* test: cover Windows session workdir normalization

---------

Co-authored-by: qkunio <qkunio@163.com>
Co-authored-by: liruifengv <liruifeng1024@gmail.com>
2026-06-08 15:10:30 +08:00
liruifengv
8d0c91faa1
fix(cli): wrap long approval shell commands (#537) 2026-06-08 15:06:25 +08:00
_Kerman
72c4b0adaa
feat: agent swarm (#424) 2026-06-08 14:26:56 +08:00
caiji
9aba465fd8
fix(tui): keep the /mcp panel border intact on multi-line server errors (#521) 2026-06-08 13:50:00 +08:00
Kai
4d113949c8
feat: honor HTTP_PROXY/HTTPS_PROXY/NO_PROXY for all outbound traffic (#487)
* feat: honor HTTP_PROXY/HTTPS_PROXY/NO_PROXY for all outbound traffic

Install a global undici dispatcher at CLI startup so every in-process fetch
(LLM APIs, MCP HTTP, web tools, telemetry, sign-in, update checks) honors the
standard proxy variables, and propagate NODE_USE_ENV_PROXY to spawned stdio
MCP child processes. Loopback hosts always bypass the proxy; an invalid proxy
URL is reported and ignored rather than aborting startup.

* feat: support SOCKS proxies via ALL_PROXY

Recognize SOCKS proxies (socks5/socks5h/socks4/socks alias) from ALL_PROXY or a
socks-scheme HTTP(S)_PROXY, routing traffic through a custom undici connector
backed by the socks client (reusing undici's own TLS handling for https).
HTTP(S) proxies keep precedence; NO_PROXY and loopback are honored for the SOCKS
path too. Child stdio MCP node processes honor HTTP(S) proxies via
NODE_USE_ENV_PROXY; SOCKS applies to the main process only.

* fix: address proxy review comments (env masking, child NO_PROXY, nix hash)

- Resolve HTTP(S)_PROXY explicitly via the first non-blank casing so a blank
  lowercase var can no longer mask a populated uppercase one (the dispatcher
  installed but went direct), and coerce a SOCKS-scheme value sitting in an
  HTTP(S) var to '' so it is never handed to EnvHttpProxyAgent.
- Reconcile a child's NO_PROXY override across both casings using the first
  non-blank value run through resolveNoProxy, so a per-server config override
  is not shadowed by the injected lowercase value, keeps the loopback bypass,
  and passes '*' through verbatim.
- Update flake.nix pnpmDeps hash for the added socks/undici dependencies.

* fix(proxy): honor http ALL_PROXY, match port-qualified NO_PROXY, note child Node version

- Honor an http-scheme ALL_PROXY as the catch-all fallback for both http and
  https (scheme-specific HTTP(S)_PROXY still wins), so an ALL_PROXY-only setup
  no longer installs a no-op dispatcher and connects direct.
- Make the SOCKS-path NO_PROXY matcher port-aware: a `host:port` entry now
  matches only that port (with IPv6-safe parsing for `::1` / `[::1]:443`).
- Document that child stdio MCP proxying via NODE_USE_ENV_PROXY only applies on
  Node versions that support it (>= 22.21 / >= 24.5).

* fix(proxy): IPv6 + wildcard NO_PROXY and per-server child proxy edges

- Strip IPv6 brackets from a SOCKS proxy host (e.g. ALL_PROXY=socks5://[::1]:1080)
  so the socks client connects to the bare address.
- Add the bracketed [::1] to the loopback bypass: undici's EnvHttpProxyAgent
  only exempts IPv6 loopback when the NO_PROXY entry is bracketed (it mis-parses
  bare ::1). The SOCKS-path matcher normalizes brackets on both sides.
- Match *.domain wildcard (and host:port) NO_PROXY entries in the SOCKS matcher.
- Compute the child stdio proxy env from the MERGED env so a proxy declared only
  in a server's config.env also enables NODE_USE_ENV_PROXY.

* fix(proxy): synthesize HTTP(S)_PROXY from ALL_PROXY for child processes

proxyEnvForChild now hands spawned stdio MCP children the resolved
HTTP_PROXY/HTTPS_PROXY (in both casings), synthesizing them from an http-scheme
ALL_PROXY when no scheme-specific variable is set. Node's --use-env-proxy reads
HTTP_PROXY/HTTPS_PROXY (not ALL_PROXY), so an ALL_PROXY-only parent now proxies
the child consistently with the main process. Shared resolveHttpProxyUrls helper
is reused by createProxyDispatcher and proxyEnvForChild.

* chore(changeset): tighten proxy changeset wording
2026-06-06 01:44:54 +08:00
luren
d995928681
fix(cli): show migration failure reason (#210)
Co-authored-by: Kai <me@kaiyi.cool>
2026-06-06 01:41:03 +08:00
github-actions[bot]
696b46ed11
ci: release packages (#453)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-05 18:25:21 +08:00
Luyu Cheng
658e4653fc
fix(tui): refine goal queue workflows (#474)
* fix(tui): harden goal startup flow

* fix(tui): refine upcoming goal handling

* fix(tui): accent upcoming goal confirmation

* docs: update goal queue guidance

* docs: address goal queue review comments

* fix(tui): avoid goal autocomplete before text

* fix(tui): highlight goal queue subcommands

* fix(tui): address goal queue review nits

* Remove useless docs

---------

Signed-off-by: Luyu Cheng <2239547+chengluyu@users.noreply.github.com>
2026-06-05 18:02:39 +08:00
liruifengv
f555c89de7
feat: prioritize built-in skill slash commands (#480) 2026-06-05 17:27:01 +08:00
7Sageer
2af19e29b9
fix: refresh provider model capabilities (#461)
* fix: refresh provider model capabilities

* refactor: build provider refresh target once and compare generically
2026-06-05 17:22:30 +08:00
Haozhe
df4f2d6e86
feat(skills): add experimental sub-skill discovery (#468)
- Add sub-skill feature flag and recursive bundle discovery behind KIMI_CODE_EXPERIMENTAL_SUB_SKILL.
- Register builtin sub-skill review and consolidate helpers as inline hidden skills.
2026-06-05 16:10:41 +08:00
Kai
93eb70a727
feat(env): migrate kimi-cli model request params and auto-update toggle (#458)
* feat(env): migrate kimi-cli model request params and auto-update toggle

Migrate still-relevant environment variables from kimi-cli:

- KIMI_MODEL_TEMPERATURE / KIMI_MODEL_TOP_P: sampling params applied
  globally to any kimi provider (not tied to KIMI_MODEL_NAME).
- KIMI_MODEL_THINKING_KEEP: Moonshot preserved-thinking passthrough
  (thinking.keep), injected only while Thinking is on.
- KIMI_CODE_NO_AUTO_UPDATE (legacy alias KIMI_CLI_NO_AUTO_UPDATE):
  fully disables the update preflight.

Wires env -> provider in Agent.get llm() via applyKimiEnvGenerationParams,
reusing kosong's existing GenerationKwargs / thinking.keep support.
KIMI_MODEL_MAX_TOKENS is intentionally untouched: it already flows through
the completion-budget path.

* fix(env): apply Kimi sampling params to compaction requests too

Sink KIMI_MODEL_TEMPERATURE / KIMI_MODEL_TOP_P into ConfigState.provider so
every request built from config.provider — main loop and full-history
compaction alike — carries them, matching kimi-cli where these live on the
shared create_llm provider. thinking.keep stays in Agent.llm because it
depends on the runtime thinking state (compaction runs thinking-off and
correctly skips it).

Splits applyKimiEnvGenerationParams into applyKimiEnvSamplingParams (applied
at provider construction) and applyKimiEnvThinkingKeep (applied in Agent.llm).

Addresses PR review feedback about compaction requests bypassing the wrapped
provider.
2026-06-05 14:54:24 +08:00
_Kerman
3a98713050
fix: show concise filtered response errors (#456) 2026-06-05 12:48:35 +08:00