@zmzai/theme 0.9.8 → 0.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zmzai/theme",
3
- "version": "0.9.8",
3
+ "version": "0.9.9",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "zmzai 全品牌设计系统 — Radix UI + framer-motion + Tailwind v4 + MiSans",
@@ -54,6 +54,8 @@ export function formatToolSummary(tool: string, input: unknown): string | null {
54
54
  const pattern = str("pattern") ?? str("query") ?? str("q");
55
55
  const url = str("url");
56
56
  const desc = str("description") ?? str("prompt") ?? str("task");
57
+ // grep 的范围字段是 pathPattern(framework builtins),与通用 path 分开取
58
+ const scope = str("pathPattern") ?? str("scope");
57
59
  const cap = (s: string): string => (s.length > 80 ? `${s.slice(0, 80)}…` : s);
58
60
  const verb = tool.charAt(0).toUpperCase() + tool.slice(1);
59
61
  switch (tool) {
@@ -62,7 +64,7 @@ export function formatToolSummary(tool: string, input: unknown): string | null {
62
64
  case "glob":
63
65
  return pattern ? `Glob ${cap(pattern)}${path ? ` in ${cap(path)}` : ""}` : path ? `Glob ${cap(path)}` : null;
64
66
  case "grep":
65
- return pattern ? `Grep ${cap(pattern)}${path ? ` in ${cap(path)}` : ""}` : path ? `Grep ${cap(path)}` : null;
67
+ return pattern ? `Grep ${cap(pattern)}${scope ? ` in ${cap(scope)}` : path ? ` in ${cap(path)}` : ""}` : path ? `Grep ${cap(path)}` : null;
66
68
  case "edit":
67
69
  case "write":
68
70
  return path ? `${tool === "edit" ? "Edit" : "Write"} ${cap(path)}` : null;