Commit graph

548 commits

Author SHA1 Message Date
qer
719ee4ac76 feat(web): add opt-in KAP debug panel tracing REST and WS traffic
Enable with ?debug=1 or localStorage kimi-web.debug=1. A ring buffer
(1000 entries, redacted secrets, truncated payloads) records every REST
call (method/path/requestId/status/envelope code/duration) and WS frame
(lifecycle, outbound control frames, inbound events with session/seq/
offset) as a side channel — request ordering and error handling are
unchanged. The panel offers a filterable timeline, per-entry JSON with
copy, JSONL export, and per-session/event-type aggregation.
2026-06-12 12:55:23 +08:00
haozhe.yang
f71ef6d466 feat(server): add session skill list and activation endpoints
- add GET /sessions/{session_id}/skills and POST .../{skill_name}:activate routes\n- add skill protocol schemas (SkillDescriptor, list/activate DTOs) and error codes\n- add ISkillService/SkillService to list and activate skills via core RPC\n- map skill errors to protocol envelopes (40415, 40912)\n- add end-to-end tests covering list, activate, unknown session/skill, and unsupported action
2026-06-12 12:34:14 +08:00
haozhe.yang
03e994257c feat(services): restore full message history from wire log for compacted sessions
- add wire.jsonl transcript reader (readWireRecords, readWireTranscript, reduceWireRecords)\n- rewrite MessageService to use wire log instead of live context history\n- add createdAtMsOverride to toProtocolMessage for wire-derived timestamps\n- add transcript cache with LRU eviction and mtime-based invalidation\n- append unflushed live tail when memory is ahead of the wire file\n- degrade to live context view on wire read/parse failures\n- add comprehensive tests for compaction, undo, clear, blob rehydration
2026-06-12 11:10:22 +08:00
qer
2e5a9e9512 chore(deps): drop markstream-vue patch, archive the fix recipe
The pnpm patch for list-nested code blocks hanging in production builds
is reverted in favor of an upstream fix; the verified recipe is archived
in reports/markstream-nested-codeblock-fix.md.

Upstream report: https://github.com/Simon-He95/markstream-vue/issues/498
2026-06-12 03:58:56 +08:00
qer
cbd9796dfb fix(web): merge assistant snapshot turns without prompt ids 2026-06-12 03:50:39 +08:00
qer
478ba49b3c style(web): hide session time on hover and move kebab to rightmost 2026-06-12 03:33:03 +08:00
qer
5725a75187 style: composer spacing and toolbar radius fix 2026-06-12 03:14:53 +08:00
qer
3f48bd5070 style: add margin-bottom to composer textarea 2026-06-12 03:12:25 +08:00
qer
46ba3a0f11 refactor: simplify session truncation to strict top-N with slot replacement 2026-06-12 03:10:51 +08:00
qer
affc69a0d3 feat(web): session list, chat pane, and daemon client updates 2026-06-12 03:08:12 +08:00
qer
a660aff5a5 fix: align show-more and group-empty with session row text 2026-06-12 03:07:55 +08:00
qer
5317f28d4d style: remove hover background from markdown-rendered tables 2026-06-12 03:06:47 +08:00
haozhe.yang
4c43950dc2 feat(server): open existing server URL with stop guidance on conflict
- Open the active server URL when `kimi server run` finds an existing local server\n- Distinguish background vs foreground server mode in conflict message\n- Show mode-appropriate stop command (`kimi server stop` or `pkill`)\n- Always include host in lock file contents\n- Add tests for already-running server handling
2026-06-11 20:59:23 +08:00
haozhe.yang
27ce0fde8b feat(server): add host to lock contents and remove svc JSDoc comments
- add host field to LockContents and acquireLock options\n- record bind host in lock file during server startup\n- remove JSDoc block comments across service manager modules\n- update start.test.ts to assert host is persisted in lock
2026-06-11 20:59:23 +08:00
haozhe.yang
5629f91dca feat(native,server): embed web assets and enrich lifecycle output
- collect and embed server web assets into the native SEA binary\n- add web-assets manifest and collection scripts for native builds\n- make swagger/swagger-ui registration conditional in server start\n- enrich lifecycle commands with service URL, running state, log path, and notes\n- add --no-open flag to control auto-opening web UI after install\n- introduce ServiceUnavailableError and ProgramServiceManager\n- update service managers (launchd, systemd, schtasks) with new status fields
2026-06-11 20:59:22 +08:00
haozhe.yang
657430f721 feat(server): add server-managed PTY terminal APIs and WebSocket controls
- add terminal protocol schemas (REST and WebSocket controls)\n- add TerminalService with node-pty backend and frame buffering\n- add REST routes for terminal CRUD operations\n- add WebSocket terminal attach, input, resize, and close handlers\n- add e2e and unit tests for terminal lifecycle and I/O
2026-06-11 20:07:44 +08:00
haozhe.yang
37d415d081 fix(server): use in-process pino-pretty stream to avoid worker transport startup failure
- switch createServerLogger from pino transport target to in-process pretty stream\n- update changeset to cover @moonshot-ai/server\n- add test asserting pretty logger does not use ThreadStream\n- rename cli server test description
2026-06-11 19:04:51 +08:00
haozhe.yang
59b5e69308 fix(kimi-code): add pino-pretty as runtime dependency
add pino-pretty to apps/kimi-code dependencies to fix server startup when pretty logging is enabled\nadd regression test verifying the dependency is declared\ninclude changeset for patch release
2026-06-11 18:38:41 +08:00
qer
334e143057 feat(web): add Kimi design-language theme, drop Terminal from pickers
Add a third UI theme "kimi" implementing the official Kimi design
language (Quiet Utility) with token-exact values from kimi-design-skill
tokens.json v0.2.0:

- Interaction accent = kimiDark (black in light / white in dark);
  kimiBlue stays reserved for brand/data-viz (::selection only)
- Gray user bubbles (bubbleGrayPc), flat tool cards and dialogs; shadows
  only on the composer (shadow.inputDefault) and floating menus
  (shadow.small); dark elevated surfaces use background.tertiary
- PingFang SC for UI, Geist Mono for code (bundled JetBrains fallback)
- Modern's de-terminalization rules are shared via
  :is(html[data-theme="modern"], html[data-theme="kimi"]) — identical
  specificity, so Modern renders exactly as before; kimi token blocks
  sit after the data-accent rules and pin the accent (the accent picker
  is hidden while kimi is active)

Theme pickers (sidebar popover, mobile sheet) and onboarding now offer
Modern/Kimi only. Terminal remains the CSS baseline and a persisted
'terminal' choice still loads; it's just no longer offered in the UI.

Also: file-preview pane default width now follows half the window.
2026-06-11 18:25:53 +08:00
haozhe.yang
19c1d2a64c chore(changeset): rename daemon references to server in changesets and docs
- update existing changeset names and contents from daemon to server\n- rename changeset files to replace daemon with server\n- update services AGENTS.md and DI README references
2026-06-11 18:14:56 +08:00
qer
943955223c feat(web): add copy conversation feedback 2026-06-11 17:40:31 +08:00
haozhe.yang
6a6a4ba9ed build(kimi-code): sort deps and add fast-json-stringify subpaths
- sort apps/kimi-code devDependencies alphabetically
- add fast-json-stringify/lib/serializer and fast-json-stringify/lib/validator to optional runtime requires
- add package.json placeholders for packages/daemon and packages/kimi-migration-legacy
2026-06-11 17:34:13 +08:00
haozhe.yang
95db7ee983 fix: correct type checks, test mocks, and package resolution
- fix swagger-ui resolution path to packages/server\n- add agent-core ./session/store package export\n- handle non-string action/message in lifecycle formatHuman\n- improve exec error message serialization\n- fix test error objects and mock return values\n- include missing event types in SDK type tests\n- update flake.nix dependency hash
2026-06-11 17:17:51 +08:00
qer
c48e46e85c Merge remote-tracking branch 'origin/feat/web' into feat/web 2026-06-11 17:14:15 +08:00
qer
b992196c29 fix: prevent IME enter from submitting composer 2026-06-11 17:09:00 +08:00
qer
7e9606a0b2 docs: archive verified research on showing manual-abort in chat flow 2026-06-11 16:52:33 +08:00
haozhe.yang
3cc8cd5cf1 Merge remote-tracking branch 'origin/main' into feat/web 2026-06-11 16:47:42 +08:00
haozhe.yang
9770f22c93 feat(server)!: rename daemon to server with service management
- rename workspace package `@moonshot-ai/daemon` to `@moonshot-ai/server`\n- rename `@moonshot-ai/daemon-e2e` to `@moonshot-ai/server-e2e`\n- replace `kimi daemon` and `kimi web` with `kimi server run`\n- keep `kimi web` as alias for `kimi server run --open`\n- add `kimi server install/uninstall/start/stop/restart/status`\n  for launchd (darwin), systemd (linux), and schtasks (win32)\n- update dev scripts, kimi-web stub, documentation, and service naming checks\n\nBREAKING CHANGE: the `kimi daemon` command and `@moonshot-ai/daemon`\npackage are removed; use `kimi server` and `@moonshot-ai/server`.
2026-06-11 16:44:41 +08:00
qer
35dbd29528 feat(kimi-web): esc interrupt, abort toast, and filepath link fixes 2026-06-11 16:31:39 +08:00
qer
fca2abe4b1 feat(web): add ESC key to interrupt running prompt 2026-06-11 16:14:40 +08:00
qer
ce569989b5 feat(web): ensure cursor pointer on copy button text and outer container 2026-06-11 16:09:10 +08:00
qer
9a26fdc574 feat(web): remove copy button hover background 2026-06-11 16:05:42 +08:00
qer
db8d21cde6 feat(web): always show copy button on hover and reduce thinking block to 5 lines 2026-06-11 16:00:53 +08:00
qer
c4761f5d65 fix(kimi-web): skip fold/hover for single-paragraph thinking
Single-paragraph thinking blocks render as plain non-foldable text.

Only multi-paragraph thinking gets the collapsible teaser preview and hover state.
2026-06-11 15:51:03 +08:00
_Kerman
a2c5e1be25
fix: add minor improvements for Mira (#649) 2026-06-11 15:50:33 +08:00
qer
8df3a571f5 fix(kimi-web): auto-hide account menu on outside click
Add document mousedown listener when the account menu opens. Clicking outside the menu or trigger button closes it automatically. The existing sidebar @click handler still works for clicks inside the sidebar.
2026-06-11 15:49:18 +08:00
qer
6776bd4dd9 feat(web): use kimi.com favicon as the site icon 2026-06-11 15:47:43 +08:00
qer
5c7dcb0039 refactor(kimi-web): introduce openWorkspaceDraft for new-session draft state
openWorkspaceDraft(workspaceId) selects the workspace, clears the active session, and drops any open file diff — the unified entry point for entering the onboarding composer without creating a backend session.

Replaces the lower-level clearActiveSession in the public API. Applied to:

- handleCreateSession (top-level + button)

- handleCreateSessionInWorkspace (sidebar / mobile switcher + button)

- addWorkspaceByPath (after adding a new workspace, go straight to draft)
2026-06-11 15:46:13 +08:00
qer
558ccb9ff8 chore(kimi-web): update page title to Kimi Code Web 2026-06-11 15:43:57 +08:00
qer
5df0540e5e feat(web): align sidebar right rail (workspace + with session times)
Move the session row kebab LEFT of the timestamp so the time stays
pinned to the right rail and no longer jumps when the kebab appears
on hover; the kebab now shares a column with the workspace ⋯ button.
Pull the workspace + glyph onto the rail (right gap 12px), mirroring
the folder icon's left gap.
2026-06-11 15:40:32 +08:00
qer
7173d700b6 fix(kimi-web): preserve workspace order on addWorkspace upsert
Introduce upsertWorkspacePreserveOrder: updates existing workspaces in place (no order change) and only prepends truly new workspaces. Applied to all addWorkspace call sites.
2026-06-11 15:40:31 +08:00
_Kerman
54302ad612
fix: scope interactive agent requests (#648) 2026-06-11 15:37:09 +08:00
qer
6d0a3e7fe9 style(kimi-web): align session kebab with workspace + button 2026-06-11 15:30:26 +08:00
qer
75aa63ae70 feat(kimi-web): defer session creation until first message
Clicking '+' now clears activeSessionId instead of eagerly creating a backend session. The onboarding composer is shown immediately.

Sending a message without an active session creates it and submits the prompt in one flow via startSessionAndSendPrompt.

createSession and createSessionInWorkspace now upsert sessions to avoid duplicates from WebSocket broadcasts.
2026-06-11 15:29:11 +08:00
liruifengv
a58b5b20bb
fix(skill): polish builtin skills KIMI_CODE_HOME resolution (#644)
- custom-theme.md, update-config.md, mcp-config.md now resolve KIMI_CODE_HOME first.

- custom-theme.md requires clarifying intent before creating or editing themes.

- custom-theme.md falls back to plain-text questions in auto mode.
2026-06-11 14:53:46 +08:00
qer
cef4664e35 fix(web): adapt steer/session-url tests and stub daemon to snapshot sync
The snapshot-based session resync (51743345) replaced listMessages with
GET /sessions/{id}/snapshot as the initial sync path. Update the two
test suites that predate it (mock getSessionSnapshot + seedSnapshot,
assert on the snapshot call) and teach the dev stub daemon the
/snapshot route so pnpm dev:stub keeps working.
2026-06-11 14:49:21 +08:00
_Kerman
1b58aa8cdf
fix: allow YOLO when starting swarm tasks (#645) 2026-06-11 14:34:35 +08:00
wenhua020201-arch
e37d7e5837
docs: note datasource latest version and manual update flow (#646)
* docs: note datasource latest version and manual update flow

* docs: align datasource version with marketplace manifest (3.2.0)

* docs: tighten datasource update wording
2026-06-11 14:31:40 +08:00
_Kerman
4e5043b03b
fix: require AgentSwarm to run alone (#643)
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
2026-06-11 13:58:35 +08:00
qer
b3161a08ad Merge remote-tracking branch 'origin/feat/web' into feat/web 2026-06-11 13:52:21 +08:00