diff --git a/.gitignore b/.gitignore index 2f3246b13..203492e4e 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,15 @@ docs/superpowers/ reports/ .superpowers/ /plan/ + +# Agent scratch / throwaway files - do not commit +.tmp/ +HANDOVER*.md +HANDOFF*.md +handoff.md +handover.md +*-designs.html +*-design.html +*-mockup.html +*-demo.html +*-demos.html diff --git a/AGENTS.md b/AGENTS.md index a9f77b457..f8cdf7c10 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -77,3 +77,7 @@ This is a TypeScript monorepo built for agent-assisted development. Keep the roo - After finishing a task and before submitting a PR, you must run the `gen-changesets` skill (see `.agents/skills/gen-changesets/SKILL.md`) and generate a changeset under `.changeset/` according to its rules. - When generating a changeset, **never** decide on a `major` bump on your own. When you judge a change to meet the major criteria (breaking changes, incompatible user configuration, renamed or removed commands/arguments, changed behavior semantics, etc.), you must stop and explain it to the user and ask for confirmation. **Only write `major` after the user has explicitly agreed.** Otherwise default to `minor` (and fall back to `patch` if `minor` is unclear). See the "Hard rule: confirm with the user before writing `major`" section in `.agents/skills/gen-changesets/SKILL.md` for details. - Prefer importing via `import ... from '#/...'`, which serves the same purpose as `import ... from '@/...'`. +- Do not commit throwaway scratch or exploratory files. Never stage: + - Agent working notes or handoff/summary documents (e.g. `HANDOVER-*.md`, `HANDOFF-*.md`, `handoff.md`). + - Throwaway UI/UX prototypes or design mockups (e.g. `*-designs.html`, `*-mockup.html`, `*-demo(s).html`) at the repo root or under a `design/` folder. The only tracked `.html` files should be Vite `index.html` entrypoints. + Before committing or opening a PR, run `git status` and `git diff --staged --stat` and remove anything matching these patterns. Put scratch work under `.tmp/` (gitignored) instead of the repo root or the source tree. diff --git a/HANDOVER-kimi-web-table-width.md b/HANDOVER-kimi-web-table-width.md deleted file mode 100644 index c3ac05613..000000000 --- a/HANDOVER-kimi-web-table-width.md +++ /dev/null @@ -1,149 +0,0 @@ -# 接手文档:kimi-web 聊天表格宽度 - -> **当前状态(未提交,用户先用着)**:表格在阅读列(≈760px)内**单元格换行**显示—— -> 不横向滚动、不溢出、不裁切,但**没有比正文更宽**。这是目前效果最干净、可以先用的版本。 -> -> **仍未达成的目标**:让宽表格像 Manus 那样**突破到比正文更宽的列**再换行。两次突破尝试 -> (容器单位 `cqw`、固定 px `@container` 断点)都没做出满意效果,已回退/停用,见 §4、§6。 -> -> **只改了 1 个文件**:`apps/kimi-web/src/components/chat/Markdown.vue`(表格样式块)。 -> typecheck / check:style 通过。 - -## 1. 背景与目标 - -`apps/kimi-web` 聊天里 markstream 渲染的 markdown 表格,默认被钉在阅读列宽内 -(`width:100%` + `table-layout:fixed`),宽表格要么被挤成很窄的列、要么表格内横向滚动。 - -用户想要的最终效果(参照 Manus 截图): - -1. 表格**比正文阅读列更宽**(横向铺开),但 -2. 单元格**换行**,所以表格**永不横向滚动**(表格自身和对话面板都不滚),且 -3. 正文 / 代码 / diff / 工具块 / thinking 等其它块仍限在 760px 阅读列内。 - -> 第 1 点(撑得比正文宽)目前**没做到**——见 §6。当前上线的是"列内换行"的降级版。 - -## 2. 当前实现(列内换行版,正在用) - -`Markdown.vue` ` - - -
-
-

消息队列 UX · 高保真原型

-

把「发送」和「中断」解耦,把队列从隐藏面板搬进对话流。下面是运行中 + 排队的核心场景,可交互(试着输入回车、点 ×、点排队项编辑、点“出队一条”)。

-
- -
- -
-
-

相对现在的改动(4 点)

-
A
发送永远是发送 — 运行中也不再变成“中断”,Enter / 按钮都是入队。
-
B
Stop 独立按钮 — 与发送平级、运行时固定显示,急停仍一键可达。
-
C
队列内联进对话流 — 作为半透明待发送气泡,看得见、点得动。
-
D
可编辑 / 可排序 / 可删除 — 点气泡编辑、拖拽排序、× 删除。
-
- -
场景 · 运行中(agent 正在改写中间件,你又追加了 3 条)
- -
-
-
- -
帮我把登录接口改成 JWT,并补上对应的单元测试。
- -

我看了一下 src/auth 的结构,当前是基于 session cookie 的实现,先读取相关文件。

- -
- - read_file - src/auth/session.ts - 0.2s -
-
- - read_file - src/auth/middleware.ts - 运行中… -
-
🌔正在改写认证中间件…
- - -
-
- - - 队列 · 3 - - 当前回合结束后自动逐条发送 -
-
-
-
- - -
-
- -
-
- - yolo - - plan - -
-
- kimi-k2· thinking - - - - - - -
-
-
- - 运行中:Enter 加入队列 · Ctrl+S 立即插入当前回合 -
-
- -
- - - - 提示:在输入框里打点什么按 Enter,会作为新气泡进队列。 -
-
-
- - -
- -
对照 · 空闲态(没有队列、没有运行中的 turn)
-
-
-
这个项目用的是什么测试框架?
-

用的是 vitest,纯逻辑测试,没有 jsdom / 组件测试。测试文件跟被测模块放在一起。

-
-
-
- -
-
- - yolo -
-
- kimi-k2· thinking - - - - -
-
-
-
-
- - -
- - - - diff --git a/apps/kimi-web/design/sidebar-show-more-demo.html b/apps/kimi-web/design/sidebar-show-more-demo.html deleted file mode 100644 index d42cf7c5d..000000000 --- a/apps/kimi-web/design/sidebar-show-more-demo.html +++ /dev/null @@ -1,649 +0,0 @@ - - - - - -kimi-web · 侧栏「展开更多」Demo - - - -
-

侧栏「展开更多」Demo

- - - -
- -
-
-
方案 A · 加载更多 + 整组折叠
(点工作区标题折叠整组)
- -
-
-
方案 B · 加载更多 + 组内展开/收起
(收回到第一页)
- -
-
-

怎么看这个 demo

- - -

方案 A:加载更多 + 整组折叠

- - -

方案 B:加载更多 + 组内展开/收起

- - -

样式差异(切到「当前实现」看)

- -

规范参考:design-system.html §07(侧栏)/ §02(token / 字体)/ §08(焦点环)。

-
-
- - - - diff --git a/apps/kimi-web/design/undo-exit-demos.html b/apps/kimi-web/design/undo-exit-demos.html deleted file mode 100644 index de6bb3c11..000000000 --- a/apps/kimi-web/design/undo-exit-demos.html +++ /dev/null @@ -1,398 +0,0 @@ - - - - - -用户消息 undo 退场动画 · 10 个候选 - - - -
-

用户消息 undo 退场动画 · 10 个候选

-

点击每条气泡预览退场效果;点击「重播」或「全部重置」可再次观看。气泡样式对齐真实 .u-bub(右对齐、accent-soft、非对称圆角)。

-
- -
- - 复杂度:低 = 纯 transform/opacity/filter;中 = 需 clip-path / perspective / 多 filter;高 = 需 @property + mask。 -
- -
- -
-
-

01 柔雾消散

-

原地失焦 + 轻微缩小。最克制、最贴设计系统的「安静」气质。

- opacity · blur · scale -
-
撤销这条消息,看看效果
-
- -
-
-

02 向右滑出

-

向右平移并淡出,方向明确(与「撤回」语义一致)。性能最好。

- translateX · opacity -
-
撤销这条消息,看看效果
-
- -
-
-

03 缩小淡出

-

向右锚点缩小并淡出。比柔雾多一点「被收走」的感觉,但仍然克制。

- scale · opacity(origin right) -
-
撤销这条消息,看看效果
-
- -
-
-

04 横向收束

-

沿右边缘把气泡压扁到 0。像把消息「抽走」,方向感强。

- scaleX · opacity(origin right) -
-
撤销这条消息,看看效果
-
- -
-
-

05 向上折起

-

3D 向上翻折消失,立体、有层次。需父级 perspective。

- rotateX · opacity · perspective -
-
撤销这条消息,看看效果
-
- -
-
-

06 裁切擦除

-

用 clip-path 从右向左裁掉。干净、利落,无明显位移。

- clip-path inset · opacity -
-
撤销这条消息,看看效果
-
- -
-
-

07 浮起消散 低~中

-

向上浮起、阴影放大、淡出。像消息「飘走」,轻盈。

- translateY · box-shadow · opacity -
-
撤销这条消息,看看效果
-
- -
-
-

08 墨迹晕开

-

失焦 + 提亮 + 去饱和,像墨迹在水里晕开。柔和、有质感。

- blur · brightness · grayscale · opacity -
-
撤销这条消息,看看效果
-
- -
-
-

09 粒子点阵消散

-

mask 点阵逐点收缩,气泡「碎成点」再消失。最接近「粒子消散」。

- @property --k · radial-gradient mask -
-
撤销这条消息,看看效果
-
- -
-
-

10 散焦放大

-

轻微放大 + 强失焦,像被一阵风吹散。比柔雾更「爆」一点。

- scale · blur · opacity -
-
撤销这条消息,看看效果
-
- -
- - - - diff --git a/composer-toolbar-designs.html b/composer-toolbar-designs.html deleted file mode 100644 index 9cabf5c22..000000000 --- a/composer-toolbar-designs.html +++ /dev/null @@ -1,298 +0,0 @@ - - - - - -kimi-web · Composer 左下角按钮设计方案 v2 - - - - - - -
-
-

Composer 左下角 · v2

- -
-

统一目标:减少噪点(去掉彩色胶囊、合并视觉块),并用完全不同的设计语言。右上角可切换深色预览。

- - -
-
A

静谧线性(Quiet Linear)

推荐
-

参考 Linear / Vercel。三个控件收进一条发丝边框的容器,黑白灰 + 精致留白;权限仅用一个 6px 状态点表达,去掉所有彩色胶囊。

-
-
给 Kimi 发送消息…
-
-
-
- - - - - -
-
-
- kimi-k2 · thinking - -
-
-
-
整条读作"一个对象"而非 3~5 个碎片;权限颜色从大字红/橙降级为一个小点,安静但仍有语义。
-
- - -
-
B

浮动胶囊 Dock(Floating Pill)

-

参考 iOS / Arc 浏览器。所有控件放进一枚圆角 999px 的"药丸",半透明 + 背景模糊,像悬浮在输入框底部的工具条。激活项用反色胶囊。

-
-
给 Kimi 发送消息…
-
-
-
- - - -
-
-
- kimi-k2 - -
-
-
-
把"当前启用的模式"直接做成反色胶囊(这里是 Plan),状态一目了然;附件退化为单个 +,节省空间。
-
- - -
-
C

毛玻璃浮层(Frosted Glass)

-

半透明磨砂 + 柔和阴影,工具条轻飘飘地浮在输入区上方,整体更"现代、通透"。权限点带一圈柔光 halo。

-
-
给 Kimi 发送消息…
-
-
-
- - - -
-
-
- kimi-k2 · thinking - -
-
-
-
通透感最强,适合配浅色/渐变背景;代价是 backdrop-filter 在低端机上略耗性能。
-
- - -
-
D

编辑式纯文字(Editorial)

-

参考 Notion / 写作应用。彻底去掉边框、填充、胶囊,只剩一条分隔线 + 精心排版的文字和小图标,hover 才显出交互。最克制、最"轻"。

-
-
给 Kimi 发送消息…
-
-
- - / - - / - -
-
- kimi-k2 · thinking - -
-
-
-
信息密度最低,几乎"隐形";适合强调输入本身、不想被工具条抢戏的场景。
-
- -
- - - -