#源码分析

83 篇文章

Pi 源码拆解(二): Agent 运行时机制

拆 pi 的 agent 主循环:为什么 StreamFn 契约禁止抛异常、失败如何编码成 stopReason=error 的 assistant 消息进入会话历史、截断的 tool call 为什么整批拒绝执行、并行工具调度如何保证 transcript 确定性,以及工具输出截断的工程细节。

columnresizing:列宽拖拽的实现

prosemirror-tables 的 columnresizing 插件与 TableView:widget 装饰生成拖拽手柄,mousemove/mousedown 的事件链,拖拽期间只改 DOM 的实时反馈,松手时 colwidth attr 一次写回,以及 handleWidth 等配置与插件拼装顺序。