@herbertgao/pi-extensions 2026.8.1 → 2026.8.2
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/README.md +5 -2
- package/node_modules/@czottmann/pi-automode/README.md +16 -2
- package/node_modules/@czottmann/pi-automode/docs/GLOSSARY.md +35 -0
- package/node_modules/@czottmann/pi-automode/docs/automode-classifier-flow.md +18 -9
- package/node_modules/@czottmann/pi-automode/docs/defaults.md +6 -2
- package/node_modules/@czottmann/pi-automode/examples/automode.local.json +6 -0
- package/node_modules/@czottmann/pi-automode/extensions/auto-mode/classifier.ts +11 -7
- package/node_modules/@czottmann/pi-automode/extensions/auto-mode/config.ts +100 -0
- package/node_modules/@czottmann/pi-automode/extensions/auto-mode/constants.ts +32 -0
- package/node_modules/@czottmann/pi-automode/extensions/auto-mode/extension.ts +78 -3
- package/node_modules/@czottmann/pi-automode/extensions/auto-mode/hard-deny.ts +16 -4
- package/node_modules/@czottmann/pi-automode/extensions/auto-mode/paths.ts +23 -1
- package/node_modules/@czottmann/pi-automode/extensions/auto-mode/permissions.ts +22 -1
- package/node_modules/@czottmann/pi-automode/extensions/auto-mode/types.ts +18 -2
- package/node_modules/@czottmann/pi-automode/package.json +4 -4
- package/node_modules/@dietrichgebert/ponytail/.opencode/command/ponytail-audit.md +5 -0
- package/node_modules/@dietrichgebert/ponytail/.opencode/command/ponytail-debt.md +5 -0
- package/node_modules/@dietrichgebert/ponytail/.opencode/command/ponytail-gain.md +5 -0
- package/node_modules/@dietrichgebert/ponytail/.opencode/command/ponytail-help.md +5 -0
- package/node_modules/@dietrichgebert/ponytail/.opencode/command/ponytail-review.md +5 -0
- package/node_modules/@dietrichgebert/ponytail/.opencode/command/ponytail.md +5 -0
- package/node_modules/@dietrichgebert/ponytail/.opencode/plugins/ponytail-frontmatter.cjs +23 -0
- package/node_modules/@dietrichgebert/ponytail/.opencode/plugins/ponytail.mjs +99 -0
- package/node_modules/@dietrichgebert/ponytail/.qoder/rules/ponytail.md +30 -0
- package/node_modules/@dietrichgebert/ponytail/.qoder-plugin/plugin.json +16 -0
- package/node_modules/@dietrichgebert/ponytail/AGENTS.md +32 -0
- package/node_modules/@dietrichgebert/ponytail/LICENSE +21 -0
- package/node_modules/@dietrichgebert/ponytail/README.es.md +298 -0
- package/node_modules/@dietrichgebert/ponytail/README.ko.md +315 -0
- package/node_modules/@dietrichgebert/ponytail/README.md +351 -0
- package/node_modules/@dietrichgebert/ponytail/assets/benchmark-3model.svg +21 -0
- package/node_modules/@dietrichgebert/ponytail/assets/benchmark-agentic.svg +62 -0
- package/node_modules/@dietrichgebert/ponytail/assets/logo-dark.png +0 -0
- package/node_modules/@dietrichgebert/ponytail/assets/logo-dark.svg +115 -0
- package/node_modules/@dietrichgebert/ponytail/assets/logo-greenpt-dark.svg +27 -0
- package/node_modules/@dietrichgebert/ponytail/assets/logo-greenpt.svg +27 -0
- package/node_modules/@dietrichgebert/ponytail/assets/logo.png +0 -0
- package/node_modules/@dietrichgebert/ponytail/assets/social-preview.png +0 -0
- package/node_modules/@dietrichgebert/ponytail/assets/waitlist-banner-es.png +0 -0
- package/node_modules/@dietrichgebert/ponytail/assets/waitlist-banner-ko.png +0 -0
- package/node_modules/@dietrichgebert/ponytail/assets/waitlist-banner.png +0 -0
- package/node_modules/@dietrichgebert/ponytail/hooks/claude-codex-hooks.json +44 -0
- package/node_modules/@dietrichgebert/ponytail/hooks/copilot-hooks.json +21 -0
- package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-activate.js +96 -0
- package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-config.js +169 -0
- package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-instructions.js +98 -0
- package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-mode-tracker.js +130 -0
- package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-runtime.js +85 -0
- package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-statusline.ps1 +24 -0
- package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-statusline.sh +18 -0
- package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-subagent.js +77 -0
- package/node_modules/@dietrichgebert/ponytail/hooks/qoder-hooks.json +26 -0
- package/node_modules/@dietrichgebert/ponytail/package.json +47 -0
- package/node_modules/@dietrichgebert/ponytail/pi-extension/index.js +211 -0
- package/node_modules/@dietrichgebert/ponytail/pi-extension/package.json +8 -0
- package/node_modules/@dietrichgebert/ponytail/scripts/uninstall.js +60 -0
- package/node_modules/@dietrichgebert/ponytail/skills/ponytail/SKILL.md +120 -0
- package/node_modules/@dietrichgebert/ponytail/skills/ponytail-audit/SKILL.md +41 -0
- package/node_modules/@dietrichgebert/ponytail/skills/ponytail-debt/SKILL.md +44 -0
- package/node_modules/@dietrichgebert/ponytail/skills/ponytail-gain/SKILL.md +50 -0
- package/node_modules/@dietrichgebert/ponytail/skills/ponytail-help/SKILL.md +71 -0
- package/node_modules/@dietrichgebert/ponytail/skills/ponytail-review/SKILL.md +57 -0
- package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +1 -3
- package/node_modules/@herbertgao/pi-cc-extensions/README.md +1 -3
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/panel.ts +10 -6
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/agent-summary.ts +6 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/compact-thinking.ts +24 -83
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/context.ts +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/markdown-enhance.ts +119 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +73 -9
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/index.ts +2 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse-hover.ts +130 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse-interaction.ts +65 -542
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse-layout.ts +160 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse-packets.ts +143 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse-scroll.ts +184 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool-diff/diff-renderer.ts +2 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool-grouping.ts +9 -2
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/transcript-refresh.ts +91 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/utils/agent-summary.ts +1 -1
- package/node_modules/@herbertgao/pi-cc-extensions/package.json +3 -3
- package/node_modules/@herbertgao/pi-cc-extensions/themes/cc-dark.json +1 -0
- package/node_modules/@herbertgao/pi-cc-extensions/themes/cc-light.json +2 -2
- package/node_modules/@herbertgao/pi-stash/README.md +9 -9
- package/node_modules/@herbertgao/pi-stash/package.json +1 -1
- package/node_modules/@herbertgao/pi-stash/src/index.ts +2 -1
- package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +14 -0
- package/node_modules/@herbertgao/pi-subagents/README.md +6 -2
- package/node_modules/@herbertgao/pi-subagents/package.json +3 -3
- package/node_modules/@herbertgao/pi-subagents/src/custom-agents.ts +85 -11
- package/node_modules/@herbertgao/pi-subagents/src/index.ts +28 -4
- package/node_modules/@herbertgao/pi-subagents/src/settings.ts +12 -0
- package/node_modules/@herbertgao/pi-subagents/src/types.ts +2 -0
- package/node_modules/@narumitw/pi-btw/LICENSE +21 -0
- package/node_modules/@narumitw/pi-btw/README.md +210 -0
- package/node_modules/@narumitw/pi-btw/package.json +53 -0
- package/node_modules/@narumitw/pi-btw/src/bring-to-main.ts +632 -0
- package/node_modules/@narumitw/pi-btw/src/btw.ts +996 -0
- package/node_modules/@narumitw/pi-btw/src/fullscreen-ui.ts +339 -0
- package/node_modules/@narumitw/pi-btw/src/index.ts +1 -0
- package/node_modules/@narumitw/pi-btw/src/menu.ts +296 -0
- package/node_modules/@narumitw/pi-btw/src/settings.ts +237 -0
- package/node_modules/@narumitw/pi-btw/src/side-thread.ts +238 -0
- package/node_modules/@narumitw/pi-btw/src/text.ts +10 -0
- package/node_modules/@narumitw/pi-btw/src/transcript-pager.ts +620 -0
- package/node_modules/@pi-plugins/fast-mode/LICENSE +21 -0
- package/node_modules/@pi-plugins/fast-mode/README.md +92 -0
- package/node_modules/@pi-plugins/fast-mode/dist/index.d.mts +6 -0
- package/node_modules/@pi-plugins/fast-mode/dist/index.d.mts.map +1 -0
- package/node_modules/@pi-plugins/fast-mode/dist/index.mjs +2026 -0
- package/node_modules/@pi-plugins/fast-mode/dist/index.mjs.map +1 -0
- package/node_modules/@pi-plugins/fast-mode/package.json +73 -0
- package/node_modules/pi-mcp-adapter/CHANGELOG.md +59 -0
- package/node_modules/pi-mcp-adapter/README.md +62 -13
- package/node_modules/pi-mcp-adapter/agent-plugin-loader.ts +377 -0
- package/node_modules/pi-mcp-adapter/commands.ts +9 -7
- package/node_modules/pi-mcp-adapter/config.ts +110 -49
- package/node_modules/pi-mcp-adapter/direct-tools.ts +34 -19
- package/node_modules/pi-mcp-adapter/elicitation-handler.ts +37 -36
- package/node_modules/pi-mcp-adapter/errors.ts +21 -17
- package/node_modules/pi-mcp-adapter/host-html-template.ts +13 -7
- package/node_modules/pi-mcp-adapter/index.ts +37 -14
- package/node_modules/pi-mcp-adapter/init.ts +9 -7
- package/node_modules/pi-mcp-adapter/json-schema-validator.ts +2 -2
- package/node_modules/pi-mcp-adapter/lifecycle.ts +8 -8
- package/node_modules/pi-mcp-adapter/logger.ts +1 -1
- package/node_modules/pi-mcp-adapter/mcp-auth-flow.ts +36 -22
- package/node_modules/pi-mcp-adapter/mcp-auth.ts +120 -2
- package/node_modules/pi-mcp-adapter/mcp-code.ts +13 -11
- package/node_modules/pi-mcp-adapter/mcp-oauth-provider.ts +19 -13
- package/node_modules/pi-mcp-adapter/mcp-output-guard.ts +15 -11
- package/node_modules/pi-mcp-adapter/mcp-panel.ts +34 -15
- package/node_modules/pi-mcp-adapter/mcp-probe.ts +131 -34
- package/node_modules/pi-mcp-adapter/mcp-script-worker.mjs +2 -2
- package/node_modules/pi-mcp-adapter/mcp-setup-panel.ts +7 -4
- package/node_modules/pi-mcp-adapter/mcp-trace.ts +59 -64
- package/node_modules/pi-mcp-adapter/metadata-cache.ts +34 -26
- package/node_modules/pi-mcp-adapter/npx-resolver.ts +6 -4
- package/node_modules/pi-mcp-adapter/oauth-handler.ts +1 -1
- package/node_modules/pi-mcp-adapter/onboarding-state.ts +19 -11
- package/node_modules/pi-mcp-adapter/package.json +13 -8
- package/node_modules/pi-mcp-adapter/panel-keys.ts +20 -4
- package/node_modules/pi-mcp-adapter/prompts.ts +2 -2
- package/node_modules/pi-mcp-adapter/proxy-modes.ts +48 -11
- package/node_modules/pi-mcp-adapter/sampling-handler.ts +22 -15
- package/node_modules/pi-mcp-adapter/search-ranking.ts +2 -1
- package/node_modules/pi-mcp-adapter/server-manager.ts +165 -113
- package/node_modules/pi-mcp-adapter/session-recovery.ts +11 -12
- package/node_modules/pi-mcp-adapter/skills/mcp-scripting/SKILL.md +3 -3
- package/node_modules/pi-mcp-adapter/state.ts +3 -1
- package/node_modules/pi-mcp-adapter/tool-approval.ts +67 -4
- package/node_modules/pi-mcp-adapter/tool-metadata.ts +6 -5
- package/node_modules/pi-mcp-adapter/tool-result-renderer.ts +14 -2
- package/node_modules/pi-mcp-adapter/ts-shape.ts +9 -2
- package/node_modules/pi-mcp-adapter/types.ts +109 -22
- package/node_modules/pi-mcp-adapter/ui-app-bridge-helpers.ts +40 -0
- package/node_modules/pi-mcp-adapter/ui-resource-handler.ts +28 -19
- package/node_modules/pi-mcp-adapter/ui-server.ts +90 -58
- package/node_modules/pi-mcp-adapter/ui-session.ts +16 -14
- package/node_modules/pi-mcp-adapter/unix-socket-transport.ts +4 -4
- package/node_modules/pi-mcp-adapter/utils.ts +23 -9
- package/package.json +22 -7
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { setHoveredCompactAssistant } from "./compact-mode.ts";
|
|
2
|
+
import {
|
|
3
|
+
isExpandedToolIoView,
|
|
4
|
+
invalidateIoView,
|
|
5
|
+
type ExpandedToolIoView,
|
|
6
|
+
type ToolIoSection,
|
|
7
|
+
} from "./tool-result.ts";
|
|
8
|
+
import type { ToolGroupComponent } from "./tool-grouping.ts";
|
|
9
|
+
import { componentAtLocalRow, type ComponentRowHit } from "./mouse-layout.ts";
|
|
10
|
+
import { setScrollButtonHovered } from "./mouse-scroll.ts";
|
|
11
|
+
|
|
12
|
+
const TOOL_HOVER_STATE_KEY = Symbol.for("pi.ccstyle.tool-hover-state");
|
|
13
|
+
|
|
14
|
+
type SharedToolHoverState = { toolCallId: string | null };
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* hover 状态宿主(Symbol.for + globalThis):模块 reload 后新旧实例共享,
|
|
18
|
+
* 测试依赖该跨实例语义。
|
|
19
|
+
*/
|
|
20
|
+
export function sharedToolHoverState(): SharedToolHoverState {
|
|
21
|
+
const host = globalThis as any;
|
|
22
|
+
return (host[TOOL_HOVER_STATE_KEY] ??= { toolCallId: null });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export let hoveredToolCallId: string | null = sharedToolHoverState().toolCallId;
|
|
26
|
+
|
|
27
|
+
export function setHoveredToolCallId(toolCallId: string | null): void {
|
|
28
|
+
hoveredToolCallId = toolCallId;
|
|
29
|
+
sharedToolHoverState().toolCallId = toolCallId;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function isToolCallHovered(toolCallId: string | null | undefined): boolean {
|
|
33
|
+
return Boolean(toolCallId && sharedToolHoverState().toolCallId === toolCallId);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
let hoveredToolGroup: ToolGroupComponent | null = null;
|
|
37
|
+
|
|
38
|
+
export function setHoveredToolGroup(group: ToolGroupComponent | null): boolean {
|
|
39
|
+
if (group === hoveredToolGroup) return false;
|
|
40
|
+
hoveredToolGroup?.setHintHovered(false);
|
|
41
|
+
hoveredToolGroup = group;
|
|
42
|
+
group?.setHintHovered(true);
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
let hoveredToolIoView: ExpandedToolIoView | null = null;
|
|
47
|
+
let hoveredToolIoSection: ToolIoSection | null = null;
|
|
48
|
+
|
|
49
|
+
export function setHoveredToolIo(
|
|
50
|
+
view: ExpandedToolIoView | null,
|
|
51
|
+
section: ToolIoSection | null,
|
|
52
|
+
): boolean {
|
|
53
|
+
// resultRendererComponent 可能是 Text/第三方 renderer;reload 后也可能残留旧实例。
|
|
54
|
+
const nextView = isExpandedToolIoView(view) ? view : null;
|
|
55
|
+
const nextSection = nextView ? section : null;
|
|
56
|
+
if (nextView === hoveredToolIoView && nextSection === hoveredToolIoSection) return false;
|
|
57
|
+
if (isExpandedToolIoView(hoveredToolIoView)) {
|
|
58
|
+
hoveredToolIoView.setHoveredSection(null);
|
|
59
|
+
invalidateIoView(hoveredToolIoView);
|
|
60
|
+
}
|
|
61
|
+
hoveredToolIoView = nextView;
|
|
62
|
+
hoveredToolIoSection = nextSection;
|
|
63
|
+
if (nextView) {
|
|
64
|
+
nextView.setHoveredSection(nextSection);
|
|
65
|
+
invalidateIoView(nextView);
|
|
66
|
+
}
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** hover 与点击共用组件定位;同一布局下按容器/宽度/行缓存,避免 motion 重复渲染。 */
|
|
71
|
+
let fullscreenHoverCacheLayout: unknown = null;
|
|
72
|
+
let fullscreenHoverComponentCache = new WeakMap<object, Map<string, ComponentRowHit | null>>();
|
|
73
|
+
|
|
74
|
+
export function cachedFullscreenComponentAtRow(
|
|
75
|
+
layout: any,
|
|
76
|
+
container: any,
|
|
77
|
+
row: number,
|
|
78
|
+
width: number,
|
|
79
|
+
): ComponentRowHit | null {
|
|
80
|
+
if (!container || typeof container !== "object") return null;
|
|
81
|
+
if (fullscreenHoverCacheLayout !== layout) {
|
|
82
|
+
fullscreenHoverCacheLayout = layout;
|
|
83
|
+
fullscreenHoverComponentCache = new WeakMap();
|
|
84
|
+
}
|
|
85
|
+
let rows = fullscreenHoverComponentCache.get(container);
|
|
86
|
+
if (!rows) {
|
|
87
|
+
rows = new Map();
|
|
88
|
+
fullscreenHoverComponentCache.set(container, rows);
|
|
89
|
+
}
|
|
90
|
+
const key = `${width}:${row}`;
|
|
91
|
+
if (rows.has(key)) return rows.get(key) ?? null;
|
|
92
|
+
const hit = componentAtLocalRow(container, row, width);
|
|
93
|
+
rows.set(key, hit);
|
|
94
|
+
return hit;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** fullscreen 鼠标悬停目标。 */
|
|
98
|
+
export type FullscreenHoverTarget =
|
|
99
|
+
| { kind: "button" }
|
|
100
|
+
| { kind: "group"; component: ToolGroupComponent }
|
|
101
|
+
| { kind: "assistant"; component: any }
|
|
102
|
+
| {
|
|
103
|
+
kind: "tool";
|
|
104
|
+
component: any;
|
|
105
|
+
view: ExpandedToolIoView | null;
|
|
106
|
+
section: ToolIoSection | null;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/** 悬停状态变化才触发渲染(motion 事件密集,状态不变跳过)。 */
|
|
110
|
+
export function applyFullscreenHover(tui: any, target: FullscreenHoverTarget | null): void {
|
|
111
|
+
let changed = false;
|
|
112
|
+
const nextCallId =
|
|
113
|
+
target?.kind === "tool" && !target.component.expanded
|
|
114
|
+
? (target.component.toolCallId ?? null)
|
|
115
|
+
: null;
|
|
116
|
+
if (nextCallId !== sharedToolHoverState().toolCallId) {
|
|
117
|
+
setHoveredToolCallId(nextCallId);
|
|
118
|
+
changed = true;
|
|
119
|
+
}
|
|
120
|
+
const nextGroup = target?.kind === "group" ? target.component : null;
|
|
121
|
+
if (setHoveredToolGroup(nextGroup)) changed = true;
|
|
122
|
+
const nextAssistant = target?.kind === "assistant" ? target.component : null;
|
|
123
|
+
if (setHoveredCompactAssistant(nextAssistant)) changed = true;
|
|
124
|
+
const nextView = target?.kind === "tool" ? target.view : null;
|
|
125
|
+
const nextSection = target?.kind === "tool" ? target.section : null;
|
|
126
|
+
if (setHoveredToolIo(nextView, nextSection)) changed = true;
|
|
127
|
+
const nextButton = target?.kind === "button";
|
|
128
|
+
if (setScrollButtonHovered(nextButton)) changed = true;
|
|
129
|
+
if (changed) tui.requestRender?.();
|
|
130
|
+
}
|