Commit graph

363 commits

Author SHA1 Message Date
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
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
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
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
qer
b3161a08ad Merge remote-tracking branch 'origin/feat/web' into feat/web 2026-06-11 13:52:21 +08:00
qer
47de235ebe Merge remote-tracking branch 'origin/feat/web' into feat/web 2026-06-11 13:51:20 +08:00
qer
7d58865f8d feat(web): improve media previews 2026-06-11 13:43:32 +08:00
haozhe.yang
694d137f84 feat(prompt): add prompt.submitted event for cross-client visibility
- define prompt.submitted schema and type in protocol\n- publish prompt.submitted from PromptService on submit and queue\n- project prompt.submitted into user messages in kimi-web\n- add unit and e2e tests for event propagation
2026-06-11 13:23:46 +08:00
qer
536d967db0 feat(web): restore 9e97773 thinking presentation; full text opens in a side drawer
In-transcript look is back to 9e97773 exactly: a live 9-line scrolling
window while the block streams, folding into the last-paragraph teaser
(grey, no chevron, hover brightens) when the stream moves past it.

What changed vs 9e97773: there is no inline expand any more. Clicking a
thinking block opens the FULL text in the right-side panel — the same
slot as the file preview (one occupant at a time, opening either closes
the other). Clicking the same block again toggles the drawer closed.
The panel resolves its text reactively from the transcript, so a block
that is still streaming keeps growing in the drawer and follows the
bottom unless the reader scrolls up; a compaction reload that drops the
turn auto-hides it. Session switches close it like the file preview.

The drawer slides in/out with a 0.28s transform; on leave it floats
fixed over the content (the grid column is already collapsed) so it can
slide away without re-entering the grid. Transition uses an explicit
:duration so a hidden tab (which swallows transitionend) still cleans
up the leaving element by timer.

Re-adds the thinking i18n namespace (panelTitle/close).
2026-06-11 13:00:19 +08:00
haozhe.yang
517433454c feat(sync): add snapshot-based session resync
- add session snapshot API and protocol schemas with epoch-aware cursors\n- track in-flight turn state and volatile delta offsets for exact rebuild\n- update web client and tests to seed snapshots before subscribing
2026-06-11 12:31:16 +08:00
qer
ef236a8900 feat: add web file preview panel 2026-06-11 12:12:10 +08:00
qer
9e9777382b feat(web): show todo progress in tab and remove align toggle 2026-06-11 10:14:48 +08:00
qer
09113dc0e1 feat(kimi-web): temporarily hide turn-summary
Comment out turnSummary display in both mobile and desktop templates,
along with helper functions (countToolsAndFiles, extractFilePath).
Keep the code intact with TODO markers for restoration.
2026-06-11 10:14:48 +08:00
qer
8e3c452a93 feat(kimi-web): add smooth expand/collapse animation to ThinkingBlock
Use CSS grid-template-rows 1fr/0fr transition for smooth height animation
when toggling between full thinking content and last-paragraph teaser.
2026-06-11 10:14:48 +08:00
qer
7100ea2ac2 feat(kimi-web): truncate session list per workspace with expand-more
- Show union of (first 5 sessions) and (sessions updated within 5 days) by default
- Add '展开更多' / 'Show more' button when sessions are hidden
- Clicking expands all sessions for that workspace
- Collapsing then re-expanding a workspace resets to default truncated view
- Add updatedAt to Session type for recency filtering
2026-06-11 10:14:48 +08:00
qer
87aec8877e feat(kimi-web): rename session delete to archive in UI
- i18n: add archiveConfirm and archive keys (zh/en)
- SessionRow: change delete confirm overlay and menu button to archive
- MobileSwitcherSheet: change delete button to archive
- Keep workspace delete as-is (separate from session archive)
2026-06-11 10:14:48 +08:00
qer
5a31aeb065 feat(kimi-web): add empty-state UI for tasks and todo tabs
- TasksPane: show '暂无后台任务' / 'No background tasks running' when empty
- TodoCard: always render header, show empty state when no todos
- i18n: add emptyTasks and emptyTodo keys for zh/en
2026-06-11 10:14:48 +08:00
qer
4394e13976 feat(kimi-web): temporarily hide files tab
Comment out the files tab from TabBar until the feature is ready.
Keep the code and badge logic intact with TODO markers.
2026-06-11 10:14:48 +08:00
qer
422cdb27a3 feat(kimi-web): polish chat UI components
- ThinkingBlock: foldable last-paragraph teaser, hover-only indicator,
  auto-collapse when streaming ends, line-height aligned with content
- ChatPane: static turn-summary at end of assistant turns
- Composer: perm-pill background matches toggle-pill
- SessionRow: kebab button moved before timestamp
- ToolCall: replace text chevron with SVG
2026-06-11 10:14:48 +08:00
qer
92101595cb style(kimi-web): simplify input focus styling 2026-06-11 10:14:48 +08:00
qer
3c48c51482 fix(kimi-web): stabilize conversation pane interactions 2026-06-11 10:14:48 +08:00
qer
d4f52da7fa feat(kimi-web): remove font settings and add dark mode support 2026-06-11 10:14:48 +08:00
qer
fd95db6ddd fix(web): workspace add button should trigger createInWorkspace instead of selectWorkspace 2026-06-11 10:14:48 +08:00
qer
34882923fd feat(web): move workspace more-menu icon before add button and add delete workspace option 2026-06-11 10:14:48 +08:00
qer
45d2cb1ed3 feat(cli): detect build-mismatched daemon and add --restart to kimi web/daemon
The daemon lock now records the host CLI version and entry path. When
kimi web / kimi daemon finds a healthy daemon started by a different
build (e.g. an older pkg.pr.new install), it warns that the running
daemon lags the invoked CLI instead of silently reusing it; the new
--restart flag stops the managed daemon and starts a fresh one with the
current build. A daemon whose lock does not match the requested port
(foreign process on the port) is never stopped.
2026-06-11 10:14:48 +08:00
qer
7448a225a7 feat(web): sidebar polish, workspace more menu, and fold animation
- Simplify session timestamps: drop 'ago' suffix (1h ago → 1h)
- Replace running status text with a non-intrusive pulse dot on session title
- Add hover-triggered kebab menu for workspaces (copy path, rename)
- Speed up fold expand/collapse animation (0.28s → 0.12s)
- Quick-start input for empty workspaces in conversation pane
2026-06-11 10:14:48 +08:00
qer
2448ded214 refactor(kimi-web): remove ago timestamp from sidebar session rows 2026-06-11 10:14:48 +08:00
qer
054c08ea75 feat(kimi-web): show empty-workspace hint in sidebar and centred quick-start input in chat 2026-06-11 10:14:48 +08:00