<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>余汉波 文档</title>
        <link>https://docs.sanrenjz.com/</link>
        <description>财经、python与效率工具的知识搬运工</description>
        <lastBuildDate>Sat, 18 Apr 2026 02:37:10 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>zh-CN</language>
        <copyright>All rights reserved 2026, 余汉波</copyright>
        <item>
            <title><![CDATA[资源下载]]></title>
            <link>https://docs.sanrenjz.com/article/资源下载</link>
            <guid>https://docs.sanrenjz.com/article/资源下载</guid>
            <pubDate>Thu, 28 Nov 2024 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-3459b82ce22081b2b028dbdb24dc98e8"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-3459b82ce2208102ba00ee157c91b56e"><span class="notion-default">下载资源存放于自建站的对象存储中，规避爬虫等不必要的流量，需关注微信 订阅号（余汉波）或服务号（三人聚智）发送“资源下载”。</span></div><div class="notion-text notion-block-3459b82ce220819dab59f97d50a09a0b"><span class="notion-default">受限于流量资费昂贵，大资源下载需跳转到官网或第三方网盘下载。若需高速下载，请到</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/">三人聚智-余汉波程序小店</a></span><span class="notion-default">购买相关产品下载。</span></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-3459b82ce220810e92c3e3234f965cf8"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://gdsx.sanrenjz.com/image/sanrenjz_yuhanbolh_yuhanbo758.png?imageSlim=&amp;spaceId=0ffd71f6-046a-4fc3-b642-5699b7c5ef56&amp;t=3459b82c-e220-810e-92c3-e3234f965cf8" alt="notion image" loading="lazy" decoding="async"/></div></figure><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3459b82ce2208164bd7ed65357b78bf5" data-id="3459b82ce2208164bd7ed65357b78bf5"><span><div id="3459b82ce2208164bd7ed65357b78bf5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce2208164bd7ed65357b78bf5" title="python程序控制工具"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">python程序控制工具</span></span></span></h2><ol start="1" class="notion-list notion-list-numbered notion-block-3459b82ce220819ab8c4ce210970fd44" style="list-style-type:decimal"><li><span class="notion-default">工具介绍：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.sanrenjz.com/sanrenjz/">sanrenjz - 三人聚智-余汉波</a></span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-3459b82ce220811f9b78e75b6cde1a13" style="list-style-type:decimal"><li><span class="notion-default">夸克网盘 3 个版本下载：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://pan.quark.cn/s/e2b9aa98c7a1">三人聚智-余汉波程序控制工具</a></span></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-3459b82ce2208155bbeed1188c70bebd" style="list-style-type:decimal"><li><span class="notion-default">github 开源下载：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/yuhanbo758/yuhanbopy-app">yuhanbo758/yuhanbopy-app: 三人聚智-余汉波程序控制工具</a></span></li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-3459b82ce22081488083f6c150c6fd3f" style="list-style-type:decimal"><li><span class="notion-default">程序小店购买下载：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/2">三人聚智-余汉波程序控制工具 | 三人聚智-余汉波程序小店</a></span></li></ol><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3459b82ce22081ec842de08a84cfc6c0" data-id="3459b82ce22081ec842de08a84cfc6c0"><span><div id="3459b82ce22081ec842de08a84cfc6c0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce22081ec842de08a84cfc6c0" title="三人聚智效率工具"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">三人聚智效率工具</span></span></span></h2><ol start="1" class="notion-list notion-list-numbered notion-block-3459b82ce22081d9b420e4f7e2d7891b" style="list-style-type:decimal"><li><span class="notion-default">工具介绍：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.sanrenjz.com/sanrenjz-tools/">sanrenjz-tools - 三人聚智-余汉波</a></span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-3459b82ce220811a84e0e028034eda37" style="list-style-type:decimal"><li><span class="notion-default">夸克网盘安装包和免安装下载： </span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://pan.quark.cn/s/79e12988c131">夸克网盘分享</a></span></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-3459b82ce22081ee9622ce8c1be0ee76" style="list-style-type:decimal"><li><span class="notion-default">github 开源下载：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/yuhanbo758/sanrenjz-tools">yuhanbo758/sanrenjz-tools: 基于Electron的桌面应用程序，集成多种效率工具，采用插件化架构，提高日常工作和学习效率，兼容utools插件</a></span></li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-3459b82ce2208190a793c287667aa7b7" style="list-style-type:decimal"><li><span class="notion-default">程序小店购买下载：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/2">三人聚智-余汉波程序控制工具 | 三人聚智-余汉波程序小店</a></span></li></ol><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3459b82ce2208188a7dcecaa052e1cf5" data-id="3459b82ce2208188a7dcecaa052e1cf5"><span><div id="3459b82ce2208188a7dcecaa052e1cf5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce2208188a7dcecaa052e1cf5" title="python量化交易程序"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">python量化交易程序</span></span></span></h2><div class="notion-text notion-block-3459b82ce22081039e5afe10121882cd"><span class="notion-default">付费阅读之后下方亦可获得下载链接——一般多人使用易开发的免费，少人使用难开发的收费：</span></div><ol start="1" class="notion-list notion-list-numbered notion-block-3459b82ce2208132a734eeb18ce6ec30" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://wd.sanrenjz.com/%E4%BB%A3%E7%A0%81%E4%B8%8E%E6%95%88%E7%8E%87/%E9%80%9A%E8%BE%BE%E4%BF%A1%E9%A2%84%E8%AD%A6%E3%80%81%E9%97%AE%E8%B4%A2%E8%BD%AE%E5%8A%A8%E3%80%81%E7%BD%91%E6%A0%BC%E3%80%81%E5%B0%81%E5%8D%95%E4%B8%8D%E8%B6%B3%E5%92%8C%E4%B8%8E%E9%80%9A%E8%BE%BE%E4%BF%A1%E7%BB%93%E5%90%88%E7%AD%89QMT%E8%87%AA%E5%8A%A8%E4%B8%8B%E5%8D%95%EF%BC%8C%E4%BB%A5%E5%8F%8A%E5%90%8E%E7%BB%AD%E6%9B%B4%E6%96%B0">通达信预警、问财轮动、网格、封单不足和与通达信结合等QMT自动下单，以及后续更新 | 余汉波 文档</a></span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-3459b82ce2208101a0c3cd2299462cdc" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://wd.sanrenjz.com/%E4%BB%A3%E7%A0%81%E4%B8%8E%E6%95%88%E7%8E%87/%206%E4%B8%87%E6%AC%A1%E5%9B%9E%E6%B5%8B%EF%BC%8C%E8%BF%915%E5%B9%B4%E5%B9%B4%E5%8C%96%E6%94%B6%E7%9B%8A%E7%8E%87%E7%99%BE%E5%88%86%E4%B9%8B58.68%E5%8F%AF%E8%BD%AC%E5%80%BA%E8%BD%AE%E5%8A%A8%E7%AD%96%E7%95%A5">6万次回测，近5年年化收益率58.68%可转债轮动策略 | 余汉波 文档</a></span></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-3459b82ce2208162b5c0fc6277aadc8e" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://wd.sanrenjz.com/%E4%BB%A3%E7%A0%81%E4%B8%8E%E6%95%88%E7%8E%87/%20%E5%8F%AF%E8%BD%AC%E5%80%BA%E8%BD%AE%E5%8A%A8%E7%AD%96%E7%95%A5%EF%BC%9A5%E5%B9%B425%E5%80%8D%EF%BC%8C%E5%B9%B4%E5%8C%96%E6%94%B6%E7%9B%8A%E7%8E%87%E7%99%BE%E5%88%86%E4%B9%8B91.35">可转债轮动策略：5年25倍，年化收益率91.35% | 余汉波 文档</a></span></li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-3459b82ce2208161bc40ee3513440425" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://wd.sanrenjz.com/%E4%BB%A3%E7%A0%81%E4%B8%8E%E6%95%88%E7%8E%87/%20%E5%8F%AF%E8%BD%AC%E5%80%BA%E8%BD%AE%E5%8A%A8%E7%AD%96%E7%95%A5%EF%BC%9A%E8%BF%915%E5%B9%B4%E5%B9%B4%E5%8C%96%E6%94%B6%E7%9B%8A%E7%8E%87%E7%99%BE%E5%88%86%E4%B9%8B67.86%EF%BC%8CQMT%E7%9A%84%E6%95%B4%E4%BD%93%E6%A1%86%E6%9E%B6+%E6%89%93%E5%9C%B0%E9%BC%A0+%E8%87%AA%E5%8A%A8%E9%80%86%E5%9B%9E%E8%B4%AD">可转债轮动策略：近5年年化收益率67.86%，QMT的整体框架+打地鼠+自动逆回购 | 余汉波 文档</a></span></li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-3459b82ce2208139944df63edbe70298" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://wd.sanrenjz.com/%E4%BB%A3%E7%A0%81%E4%B8%8E%E6%95%88%E7%8E%87/Python%E6%89%93%E9%80%A0%E9%80%9A%E8%BE%BE%E4%BF%A1%E8%87%AA%E5%8A%A8%E4%BA%A4%E6%98%93%E7%B3%BB%E7%BB%9F%EF%BC%9A%E7%AA%81%E7%A0%B4%E7%99%BE%E5%88%862%E4%BB%B7%E6%A0%BC%E7%AC%BC%E5%AD%90%E9%99%90%E5%88%B6">Python打造通达信自动交易系统QMT：突破2%价格笼子限制 | 余汉波 文档</a></span></li></ol><ol start="6" class="notion-list notion-list-numbered notion-block-3459b82ce22081318127ec34ff6c8468" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://wd.sanrenjz.com/%E4%BB%A3%E7%A0%81%E4%B8%8E%E6%95%88%E7%8E%87/QMT%E4%B8%8E%E9%80%9A%E8%BE%BE%E4%BF%A1%E7%BB%93%E5%90%88%EF%BC%8C%E5%AE%9E%E7%8E%B0%E4%B8%93%E5%B1%9E%E9%87%8F%E5%8C%96%E4%BA%A4%E6%98%93%EF%BC%9A%E9%80%9A%E8%BE%BE%E4%BF%A1%E8%87%AA%E5%8A%A8%E4%BA%A4%E6%98%93%E7%B3%BB%E7%BB%9F">QMT与通达信结合，实现专属量化交易：通达信自动交易系统 | 余汉波 文档</a></span></li></ol><ol start="7" class="notion-list notion-list-numbered notion-block-3459b82ce220814dbdf0c99d72ccab92" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://wd.sanrenjz.com/%E4%BB%A3%E7%A0%81%E4%B8%8E%E6%95%88%E7%8E%87/QMT%E4%B8%8E%E9%80%9A%E8%BE%BE%E4%BF%A1%E7%BB%93%E5%90%882.0%EF%BC%8C%E7%9B%91%E6%B5%8B%E4%BA%A4%E6%98%93%E7%B3%BB%E7%BB%9F%EF%BC%9A%E9%80%9A%E8%BE%BE%E4%BF%A1%E8%87%AA%E5%8A%A8%E4%BA%A4%E6%98%93%E7%B3%BB%E7%BB%9F">QMT与通达信结合2.0，监测交易系统：通达信自动交易系统 | 余汉波 文档</a></span></li></ol><ol start="8" class="notion-list notion-list-numbered notion-block-3459b82ce2208158ad88dae948c7e6b5" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://wd.sanrenjz.com/%E4%BB%A3%E7%A0%81%E4%B8%8E%E6%95%88%E7%8E%87/QMT%E4%B8%8E%E9%80%9A%E8%BE%BE%E4%BF%A1%E7%BB%93%E5%90%883.0%EF%BC%8C%E7%9B%91%E6%B5%8B%E4%BA%A4%E6%98%93%E7%B3%BB%E7%BB%9F%EF%BC%9A%E9%80%9A%E8%BE%BE%E4%BF%A1%E5%85%AC%E5%BC%8F%E8%87%AA%E5%8A%A8%E4%BA%A4%E6%98%93%E7%B3%BB%E7%BB%9F">QMT与通达信结合3.0，监测交易系统：通达信公式自动交易系统 | 余汉波 文档</a></span></li></ol><ol start="9" class="notion-list notion-list-numbered notion-block-3459b82ce220810a86cac8fb47f13995" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://wd.sanrenjz.com/%E4%BB%A3%E7%A0%81%E4%B8%8E%E6%95%88%E7%8E%87/QMT%E4%B8%8E%E9%80%9A%E8%BE%BE%E4%BF%A1%E7%BB%93%E5%90%88%204.0%EF%BC%9A%E7%9B%91%E6%B5%8B%E4%BA%A4%E6%98%93%E7%B3%BB%E7%BB%9F%EF%BC%8C%E9%80%9A%E8%BE%BE%E4%BF%A1%E5%85%AC%E5%BC%8F%E8%87%AA%E5%8A%A8%E4%BA%A4%E6%98%93%E7%B3%BB%E7%BB%9F">QMT与通达信结合 4.0：监测交易系统，通达信公式自动交易系统 | 余汉波 文档</a></span></li></ol><ol start="10" class="notion-list notion-list-numbered notion-block-3459b82ce22081bbb1ebfb3ff76fac02" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://wd.sanrenjz.com/%E4%BB%A3%E7%A0%81%E4%B8%8E%E6%95%88%E7%8E%87/Python%20%E8%87%AA%E5%8A%A8%E5%8C%96%E4%BA%A4%E6%98%93%E4%BB%A3%E7%A0%81%EF%BC%8C%E4%B8%9C%E8%B4%A2%E8%82%A1%E7%A5%A8%E8%87%AA%E5%8A%A8%E5%8C%96%E4%BA%A4%E6%98%93">Python 自动化交易代码，东财股票自动化交易 | 余汉波 文档</a></span></li></ol><ol start="11" class="notion-list notion-list-numbered notion-block-3459b82ce2208116abb3d63c367896e4" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://wd.sanrenjz.com/%E4%BB%A3%E7%A0%81%E4%B8%8E%E6%95%88%E7%8E%87/%20%E4%BD%BF%E7%94%A8Python%E5%92%8C%E6%8E%98%E9%87%91%E9%87%8F%E5%8C%96API%E5%AE%9E%E7%8E%B0%E8%82%A1%E7%A5%A8%E5%BC%80%E7%9B%98%E5%BC%BA%E5%BC%B1%E6%8E%92%E5%90%8D%E5%B7%A5%E5%85%B7">Python和掘金量化API实现股票开盘强弱排名工具 | 余汉波 文档</a></span></li></ol><ol start="12" class="notion-list notion-list-numbered notion-block-3459b82ce220817a9ccaf1bb3eb94059" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://wd.sanrenjz.com/%E4%BB%A3%E7%A0%81%E4%B8%8E%E6%95%88%E7%8E%87/%E4%B8%AA%E4%BA%BA%E4%BD%BF%E7%94%A8%E7%9A%84Obsidian%E4%BB%93%E5%BA%93%EF%BC%8C71%E4%B8%AA%E6%8F%92%E4%BB%B6%E5%92%8C4%E4%B8%AA%E4%B8%BB%E9%A2%98">个人使用的Obsidian仓库，71个插件和4个主题 | 余汉波 文档</a></span></li></ol><ol start="13" class="notion-list notion-list-numbered notion-block-3459b82ce2208106a89be657d0c61bcd" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/2">三人聚智-余汉波程序控制工具使用说明 | 三人聚智-余汉波程序小店</a></span></li></ol><ol start="14" class="notion-list notion-list-numbered notion-block-3459b82ce22081edb3dfee5df0b715ee" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/6">OBS录播直播画面智能缩放大师脚本 | 三人聚智-余汉波程序小店</a></span></li></ol><ol start="15" class="notion-list notion-list-numbered notion-block-3459b82ce22081099212c7a30db8db88" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/10">（加密）QMT与问财结合-双向交易：问财数据自动化交易系统 | 三人聚智-余汉波程序小店</a></span></li></ol><ol start="16" class="notion-list notion-list-numbered notion-block-3459b82ce22081fd902df7738bca5d95" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/11">（非加密）QMT与问财结合-双向交易：问财数据自动化交易系统 | 三人聚智-余汉波程序小店</a></span></li></ol><ol start="17" class="notion-list notion-list-numbered notion-block-3459b82ce22081d1835df1bafdf6b6d6" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/12">（加密）QMT与问财结合-单策略：自然语言自动化交易系统 | 三人聚智-余汉波程序小店</a></span></li></ol><ol start="18" class="notion-list notion-list-numbered notion-block-3459b82ce2208141a401f2827db65fd3" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/13">（非加密）QMT与问财结合-单策略：自然语言自动化交易系统 | 三人聚智-余汉波程序小店</a></span></li></ol><ol start="19" class="notion-list notion-list-numbered notion-block-3459b82ce220815ca5edfa3e2de262af" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/19">（加密）QMT与同花顺结合：动态板块监控交易 | 三人聚智-余汉波程序小店</a></span></li></ol><ol start="20" class="notion-list notion-list-numbered notion-block-3459b82ce2208164bf66e003f6e7e3f2" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/20">（非加密）QMT与同花顺结合：动态板块监控交易 | 三人聚智-余汉波程序小店</a></span></li></ol><ol start="21" class="notion-list notion-list-numbered notion-block-3459b82ce220812582fce9155547203f" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/14">（加密）QMT与问财结合-单策略2.0：自然语言自动化交易系统 | 三人聚智-余汉波程序小店</a></span><span class="notion-default">：</span></li></ol><ol start="22" class="notion-list notion-list-numbered notion-block-3459b82ce2208157878df2e3bf13bb2c" style="list-style-type:decimal"><li><span class="notion-default">[（非加密）QMT与问财结合-单策略2.0：自然语言自动化交易系统 | 三人聚智-余汉波程序小店](</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://shop.sanrenjz.com/product/68838f3e90edb81a45994a91">程序小店 - 虚拟商品销售平台</a></span><span class="notion-default">)</span></li></ol><ol start="23" class="notion-list notion-list-numbered notion-block-3459b82ce2208106981ecea83412b257" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://shop.sanrenjz.com/product/6883a2fd90edb81a45994aa8">程序小店 - QMT结合通达信板块5.0-自动化下单系统</a></span></li></ol><ol start="24" class="notion-list notion-list-numbered notion-block-3459b82ce22081e8806eec885df8e310" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://docs.sanrenjz.com/article/%E5%B0%8FQMT%E6%95%B0%E6%8D%AE%E8%8E%B7%E5%8F%96%E4%B8%8B%E8%BD%BD%EF%BC%8C%E6%8C%81%E4%BB%93%E5%92%8C%E5%85%A8%E6%8E%A8%E8%BF%9E%E6%8E%A5%E6%B5%8B%E8%AF%95">小QMT数据获取下载，持仓和全推连接测试 | 余汉波 文档</a></span><span class="notion-default">:</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://xz.sanrenjz.com/Download/0srIjIYfj3X9.zip">下载</a></span></li></ol><ol start="25" class="notion-list notion-list-numbered notion-block-3459b82ce220814fb421edeaf7180700" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://shop.sanrenjz.com/product/69c1dafed64de6758c5268bd">程序小店 - Codebot-基于OpenCode的个人AI助手</a></span><span class="notion-default">；github开源：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/yuhanbo758/codebot">yuhanbo758/codebot</a></span><span class="notion-default">、或 </span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://gitee.com/yuhanbo758/codebot">gitee：yuhanbo758/codebot</a></span><span class="notion-default"> ；</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://pan.quark.cn/s/32af0c9b87cc">夸克</a></span><span class="notion-default">下载</span></li></ol><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3459b82ce220810fa1bae2629564d3c5" data-id="3459b82ce220810fa1bae2629564d3c5"><span><div id="3459b82ce220810fa1bae2629564d3c5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce220810fa1bae2629564d3c5" title="python 效率程序"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">python 效率程序</span></span></span></h2><ol start="1" class="notion-list notion-list-numbered notion-block-3459b82ce22081e49d00e2c5dc6cca61" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/5">腾讯云加密上传大师 | 三人聚智-余汉波程序小店</a></span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-3459b82ce22081f5addbff9d4a14ae81" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/7">腾讯云COS文件上传工具 | 三人聚智-余汉波程序小店</a></span></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-3459b82ce220816a82d5f46ced603500" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/21">WordPress 分类和文章密码访问 | 三人聚智-余汉波程序小店</a></span></li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-3459b82ce22081aaa136e9804bfe1683" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/24">Python脚本运行器 | 三人聚智-余汉波程序小店</a></span></li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-3459b82ce22081278c8fef43a0f645d1" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/25">账号密码管理器 | 三人聚智-余汉波程序小店</a></span></li></ol><ol start="6" class="notion-list notion-list-numbered notion-block-3459b82ce220811cba40e14d5f57a455" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://shop.sanrenjz.com/product/68cfbedb23eb0c32a9053f71">程序小店 - 封面图自动剪切工具</a></span></li></ol><ol start="7" class="notion-list notion-list-numbered notion-block-3459b82ce22081458032e79790736de1" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://shop.sanrenjz.com/product/68d00a8923eb0c32a9053f7e">程序小店 - 腾讯云对象存储下载器2.0</a></span><span class="notion-default">：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://xz.sanrenjz.com/Download/xNP5rI4LJR7x.zip">下载</a></span></li></ol><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3459b82ce2208189ada6ea8e7418f94e" data-id="3459b82ce2208189ada6ea8e7418f94e"><span><div id="3459b82ce2208189ada6ea8e7418f94e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce2208189ada6ea8e7418f94e" title="三人聚智效率工具插件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">三人聚智效率工具插件</span></span></span></h2><ol start="1" class="notion-list notion-list-numbered notion-block-3459b82ce22081f3b31ff2a41414d50c" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/22">utools插件：一个基于多模型融合的智能AI助手 | 三人聚智-余汉波程序小店</a></span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-3459b82ce220816c8a92f8f7a7a589c9" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/23">utools插件：余汉波文本片段助手——快速搜索与插入MD文件工具 | 三人聚智-余汉波程序小店</a></span></li></ol><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3459b82ce2208127a5b3d7464413a807" data-id="3459b82ce2208127a5b3d7464413a807"><span><div id="3459b82ce2208127a5b3d7464413a807" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce2208127a5b3d7464413a807" title="Obsidian"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">Obsidian</span></span></span></h2><div class="notion-text notion-block-3459b82ce22081998c12ce0a78e7541f"><span class="notion-default">注：提供非社区插件市场插件，通过 BRAT 安装可自动更新（直接从 github 上拉取），更建议通过此途径。而我个人开发的插件，仅可在此下载。</span></div><ol start="1" class="notion-list notion-list-numbered notion-block-3459b82ce22081c5bcbdd1cf1001d825" style="list-style-type:decimal"><li><span class="notion-default">Various Complements 插件的中文补全库： </span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://kdy.sanrenjz.com/#s/_DFn3ohQ">cedict_ts. u8</a></span><span class="notion-default"> ， </span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://kdy.sanrenjz.com/#s/_DFpbKKA">字典</a></span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-3459b82ce22081f5a9dbe279438e227d" style="list-style-type:decimal"><li><span class="notion-default">web-browser 插件：下载 </span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://kdy.sanrenjz.com/#s/_DFrEv7A">web-browser</a></span><span class="notion-default">，BRAT 安装：Stardusten/ob-table-enhancer，或跳转至 </span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/Trikzon/obsidian-web-browser">Trikzon/obsidian-web-browser</a></span></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-3459b82ce220812ca777f58e39225df1" style="list-style-type:decimal"><li><span class="notion-default">编辑增强插件：下载 </span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://kdy.sanrenjz.com/#s/_DFtl5jw">ob-table-enhancer</a></span><span class="notion-default">，BRAT 安装：Stardusten/ob-table-enhancer，</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/Stardusten/ob-table-enhancer">Stardusten/ob-table-enhancer</a></span></li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-3459b82ce22081069113ceaf4805e335" style="list-style-type:decimal"><li><span class="notion-default">booknote：下载 </span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://kdy.sanrenjz.com/#s/_DFu55bw">booknote</a></span><span class="notion-default">，</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://gdsx-1253499515.cos.ap-guangzhou.myqcloud.com/%E5%85%B1%E4%BA%AB%E8%B5%84%E6%BA%90/Obsidian/webviewer.7z">webviewer</a></span><span class="notion-default">，官方飞书文档（建议此途径，可以下载最新版）：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://kknwfe6755.feishu.cn/docs/doccnBfbtETItLHMmbDBGBRdPrh">booknote插件</a></span></li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-3459b82ce22081ffb9cbccf7f4cb5b60" style="list-style-type:decimal"><li><span class="notion-default">obsidian-yuhanbo-ai：下载 </span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://kdy.sanrenjz.com/#s/_DeVlZXw">obsidian-yuhanbo-ai</a></span><span class="notion-default">，或 github 下载 </span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/yuhanbo758/obsidian-yuhanbo-ai">yuhanbo758/obsidian-yuhanbo-ai</a></span></li></ol><ol start="6" class="notion-list notion-list-numbered notion-block-3459b82ce2208135af8ce63dab5e20da" style="list-style-type:decimal"><li><span class="notion-default">obsidian-yuhanbo-python：下载 </span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://kdy.sanrenjz.com/#s/_EANZqEQ">obsidian-yuhanbo-python</a></span><span class="notion-default">，或 github 下载 </span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/yuhanbo758/obsidian-yuhanbo-python">yuhanbo758/obsidian-yuhanbo-python</a></span></li></ol><ol start="7" class="notion-list notion-list-numbered notion-block-3459b82ce220817f9075c55809c08559" style="list-style-type:decimal"><li><span class="notion-default">obsidian-yuhanbo-python2.0：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/26">obsidian插件：yuhanbo-python2.0，在OB中直接运行python和执行定时任务 | 三人聚智-余汉波程序小店</a></span></li></ol><ol start="8" class="notion-list notion-list-numbered notion-block-3459b82ce220819484f2d72fbc7e6b38" style="list-style-type:decimal"><li><span class="notion-default">obsidian-yuhanbo-search： </span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/27">obsidian插件：yuhanbo--search，自定义加权的内容搜索插件 | 三人聚智-余汉波程序小店</a></span><span class="notion-default">，或 github 下载：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/yuhanbo758/obsidian-yuhanbo-search">yuhanbo758/obsidian-yuhanbo-search: obsidian的搜索搜索，主要功能是解决搜索加权的问题，可以自行设置标题、属性、引用等的加权搜索</a></span></li></ol><ol start="9" class="notion-list notion-list-numbered notion-block-3459b82ce2208172b0c0c3d3e9d79a4e" style="list-style-type:decimal"><li><span class="notion-default">obsidian-yuhanbo-search2.0：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/32">obsidian插件：加权搜索yuhanbo-search2.0 | 三人聚智-余汉波程序小店</a></span></li></ol><ol start="10" class="notion-list notion-list-numbered notion-block-3459b82ce22081fcb1dbf4a4ca71d6c6" style="list-style-type:decimal"><li><span class="notion-default">obsidian-yuhanbo-ai-auto2.0： </span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/33">obsidian插件：auto2.0 AI内容生成 | 三人聚智-余汉波程序小店</a></span></li></ol><ol start="11" class="notion-list notion-list-numbered notion-block-3459b82ce22081dfa8c8cc0987c5f9fe" style="list-style-type:decimal"><li><span class="notion-default">obsidian-yuhanbo-task：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://xz.sanrenjz.com/Download/obsidian-yuhanbo-task.zip">下载</a></span><span class="notion-default">，或 </span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://shop.sanrenjz.com/product/68820fdd90edb81a45994a1b">obsidian插件：yuhanbo-task，智能任务管理与番茄时钟插件 | 三人聚智-余汉波程序小店</a></span></li></ol><ol start="12" class="notion-list notion-list-numbered notion-block-3459b82ce22081a7866efe51229be934" style="list-style-type:decimal"><li><span class="notion-default">obsidian-yuhanbo-ai-auto3.0：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://shop.sanrenjz.com/product/68df17b123eb0c32a905414c">程序小店 - obsidian插件-auto3.0，生成文本和图片，知识库检索</a></span></li></ol><ol start="13" class="notion-list notion-list-numbered notion-block-3459b82ce22081b7a289db7728096ea3" style="list-style-type:decimal"><li><span class="notion-default">obsidian-yuhanbo-voice_assistant：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://xz.sanrenjz.com/Download/m6wTwZIqnMb4.zip">下载</a></span><span class="notion-default">，或</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://shop.sanrenjz.com/product/68e103718c26cc69cc969957">程序小店 - obsidian插件-语音助手，语音交互、语音合成、唤醒及多种大模型</a></span></li></ol><ol start="14" class="notion-list notion-list-numbered notion-block-3459b82ce22081228c9bd44d09948809" style="list-style-type:decimal"><li><span class="notion-default">obsidian-yuhanbo-task2.0：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://xz.sanrenjz.com/Download/vBLmal3KwG6o.zip">下载</a></span><span class="notion-default">，或</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://shop.sanrenjz.com/product/68e35c998c26cc69cc9699b0">程序小店 - obsidian插件-task，番茄时钟、任务管理、AI智能拆分</a></span></li></ol><ol start="15" class="notion-list notion-list-numbered notion-block-3459b82ce22081a09e13ff966dc4e1fd" style="list-style-type:decimal"><li><span class="notion-default">obsidian-yuhanbo-search3.0：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://xz.sanrenjz.com/Download/VqIgREYgf4Rh.zip">加权搜索下载</a></span></li></ol><ol start="16" class="notion-list notion-list-numbered notion-block-3459b82ce22081e69f53f5deea029f15" style="list-style-type:decimal"><li><span class="notion-default">obsidian-yuhanbo-iflow：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://shop.sanrenjz.com/product/69d44995cc92ff8fa15356a8">程序小店 - obsidian插件-yuhanbo-iflow</a></span><span class="notion-default">，</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://gitee.com/yuhanbo758/obsidian-yuhanbo-iflow">obsidian-yuhanbo-iflow: Integrate iFlow CLI into Obsidian</a></span><span class="notion-default">，</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/yuhanbo758/obsidian-yuhanbo-iflow">yuhanbo758/obsidian-yuhanbo-iflow: Integrate iFlow CLI into Obsidian</a></span></li></ol><ol start="17" class="notion-list notion-list-numbered notion-block-3459b82ce2208124bb10d3463ed3e34d" style="list-style-type:decimal"><li><span class="notion-default">obsidian-yuhanbo-wechat_public：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://shop.sanrenjz.com/product/69daeadc9fb3f19a52aac14e">程序小店 - obsidian插件-微信Markdown编辑器</a></span></li></ol><ol start="18" class="notion-list notion-list-numbered notion-block-3459b82ce2208102a3b9dc53a7731694" style="list-style-type:decimal"><li><span class="notion-default">obsidian-yuhanbo-opencode：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://shop.sanrenjz.com/product/69e200389fb3f19a52aac20e">程序小店 - obsidian插件-OpenCode AI助手</a></span></li></ol><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3459b82ce2208181864fc03c3b22771c" data-id="3459b82ce2208181864fc03c3b22771c"><span><div id="3459b82ce2208181864fc03c3b22771c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce2208181864fc03c3b22771c" title="其他软件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">其他软件</span></span></span></h2><ol start="1" class="notion-list notion-list-numbered notion-block-3459b82ce22081a69249e7cc38bc1268" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://share.weiyun.com/AavG3P08">国金证券 Ptrade</a></span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-3459b82ce2208193a47aebaaefbebdc2" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://share.weiyun.com/0JHPeDfo">国金证券QMT实盘</a></span></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-3459b82ce2208163a800efaf16e2c8a6" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://share.weiyun.com/yNdHyoQE">国金证券QMT模拟</a></span></li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-3459b82ce22081a9bbb2e69054bc3923" style="list-style-type:decimal"><li><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://pan.xunlei.com/s/VNtjmgfabKFO6WXQ0riJOoxxA1?pwd=uh8z#">剪映破解版</a></span></li></ol></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[obsidian插件-yuhanbo-opencode：OpenCode 个人AI助手]]></title>
            <link>https://docs.sanrenjz.com/article/obsidian插件-yuhanbo-opencode：OpenCode 个人AI助手</link>
            <guid>https://docs.sanrenjz.com/article/obsidian插件-yuhanbo-opencode：OpenCode 个人AI助手</guid>
            <pubDate>Fri, 17 Apr 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[OpenCode AI助手是一款将 OpenCode CLI 深度集成到 Obsidian 的插件，实现了 AI 辅助写作、知识库问答、全文 BM25 搜索、定时任务自动化等功能。本文将深入剖析其代码]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-3459b82ce22081d6b236e4188825e7aa"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-3459b82ce22081529d9fded052f381df"><span class="notion-default">OpenCode AI助手是一款将 OpenCode CLI 深度集成到 Obsidian 的插件，实现了 AI 辅助写作、知识库问答、全文 BM25 搜索、定时任务自动化等功能。本文将深入剖析其代码架构、核心模块与实现原理，帮助开发者理解插件的设计思路和技术细节。</span></div><div class="notion-text notion-block-3459b82ce220810c8f4df428d1ded5e9"><span class="notion-default">该插件采用 TypeScript 开发，基于 Obsidian Plugin API 构建，通过 HTTP REST API 与 SSE（Server-Sent Events）与 OpenCode CLI 后端通信，实现了流式对话、工具调用状态同步、会话管理等高级功能。同时，插件内置了完整的 BM25 搜索引擎，支持中文和英文关键词检索，为知识库问答提供了精准的本地搜索能力。</span></div><div class="notion-text notion-block-3459b82ce22081f49e1ce43d397c1978"><span class="notion-default">bili 视频：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.bilibili.com/video/BV1ZndVBrEU6/?vd_source=247ac77d4ae7339ea06d0fec09aa8f70">obsidian插件-yuhanbo-opencode：OpenCode 个人AI助手_哔哩哔哩_bilibili</a></span></div><div class="notion-text notion-block-3459b82ce2208161a3fae4b1b7742cd3"><span class="notion-default">程序小店：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://shop.sanrenjz.com/product/69e200389fb3f19a52aac20e">程序小店 - obsidian插件-OpenCode AI助手</a></span></div><div class="notion-text notion-block-3459b82ce2208112a0c4e68e95388e7b"><span class="notion-default">相关的开源插件：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.yuhanbo.cn/article/obsidian%E6%8F%92%E4%BB%B6-yuhanbo-iflow%EF%BC%8C%E5%B0%86iFlow%20CLI%E9%9B%86%E6%88%90%E5%88%B0Obsidian">obsidian插件-yuhanbo-iflow，将iFlow CLI集成到Obsidian | 余汉波 文档</a></span></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3459b82ce22081d7ba4ff5ad15977ab1" data-id="3459b82ce22081d7ba4ff5ad15977ab1"><span><div id="3459b82ce22081d7ba4ff5ad15977ab1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce22081d7ba4ff5ad15977ab1" title="核心架构"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">核心架构</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3459b82ce22081529e5ef8f6f654d8f9" data-id="3459b82ce22081529e5ef8f6f654d8f9"><span><div id="3459b82ce22081529e5ef8f6f654d8f9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce22081529e5ef8f6f654d8f9" title="插件主类 IFlowPlugin"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">插件主类 IFlowPlugin</span></span></span></h4><div class="notion-text notion-block-3459b82ce220817d8674e0df50c06bfa"><span class="notion-default"><code class="notion-inline-code">IFlowPlugin</code></span><span class="notion-default"> 类是插件的核心入口，继承自 Obsidian 的 </span><span class="notion-default"><code class="notion-inline-code">Plugin</code></span><span class="notion-default"> 基类。它负责：</span></div><ol start="1" class="notion-list notion-list-numbered notion-block-3459b82ce220813cb54fecb67c1c6c59" style="list-style-type:decimal"><li><span class="notion-default"><b>生命周期管理</b></span><span class="notion-default">：</span><span class="notion-default"><code class="notion-inline-code">onload()</code></span><span class="notion-default"> 初始化所有组件，</span><span class="notion-default"><code class="notion-inline-code">onunload()</code></span><span class="notion-default"> 清理资源</span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-3459b82ce22081608691fdf535a5df3a" style="list-style-type:decimal"><li><span class="notion-default"><b>设置管理</b></span><span class="notion-default">：通过 </span><span class="notion-default"><code class="notion-inline-code">PluginSettingTab</code></span><span class="notion-default"> 提供可视化配置界面</span></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-3459b82ce220814290eaf60b6086e7de" style="list-style-type:decimal"><li><span class="notion-default"><b>视图注册</b></span><span class="notion-default">：注册 </span><span class="notion-default"><code class="notion-inline-code">IFlowChatView</code></span><span class="notion-default"> 侧边栏视图，提供 AI 对话界面</span></li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-3459b82ce22081a1a17de5d6a633ff38" style="list-style-type:decimal"><li><span class="notion-default"><b>命令注册</b></span><span class="notion-default">：注册&quot;打开 AI 面板&quot;、&quot;管理定时任务&quot;、&quot;搜索笔记&quot;等命令</span></li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-3459b82ce22081e6b8b1d298f3222d28" style="list-style-type:decimal"><li><span class="notion-default"><b>适配器管理</b></span><span class="notion-default">：创建和管理 </span><span class="notion-default"><code class="notion-inline-code">OpenCodeAdapter</code></span><span class="notion-default"> 实例，与 CLI 后端通信</span></li></ol><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3459b82ce2208103b310f4735204b1e1" data-id="3459b82ce2208103b310f4735204b1e1"><span><div id="3459b82ce2208103b310f4735204b1e1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce2208103b310f4735204b1e1" title="设置系统"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">设置系统</span></span></span></h4><div class="notion-text notion-block-3459b82ce220818bbd33f7c4964f5288"><span class="notion-default">插件支持丰富的配置选项，通过 </span><span class="notion-default"><code class="notion-inline-code">IFlowPluginSettings</code></span><span class="notion-default"> 接口定义：</span></div><table class="notion-simple-table notion-block-3459b82ce2208151949afb800af08264"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-3459b82ce22081899788d764729d1cd6"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">设置类别</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">关键配置项</span></div></td></tr><tr class="notion-simple-table-row notion-block-3459b82ce2208168a60fc3fd14e8367f"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">CLI 后端</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default"><code class="notion-inline-code">cliBackend</code></span><span class="notion-default">、</span><span class="notion-default"><code class="notion-inline-code">opencodePath</code></span><span class="notion-default">、</span><span class="notion-default"><code class="notion-inline-code">opencodeUrl</code></span><span class="notion-default">、</span><span class="notion-default"><code class="notion-inline-code">autoStartProcess</code></span></div></td></tr><tr class="notion-simple-table-row notion-block-3459b82ce2208113961dc1abacff85b1"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">模板与 Skills</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default"><code class="notion-inline-code">templatePaths</code></span><span class="notion-default">、</span><span class="notion-default"><code class="notion-inline-code">skillsPaths</code></span><span class="notion-default">、</span><span class="notion-default"><code class="notion-inline-code">lskillPaths</code></span></div></td></tr><tr class="notion-simple-table-row notion-block-3459b82ce220818f9f88d49c17fd64bd"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">搜索参数</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default"><code class="notion-inline-code">searchTopN</code></span><span class="notion-default">、</span><span class="notion-default"><code class="notion-inline-code">searchBm25K1</code></span><span class="notion-default">、</span><span class="notion-default"><code class="notion-inline-code">searchBm25B</code></span><span class="notion-default">、</span><span class="notion-default"><code class="notion-inline-code">searchKeywordWeights</code></span></div></td></tr><tr class="notion-simple-table-row notion-block-3459b82ce2208139a1ccd2cfd61590a2"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">邮件通知</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default"><code class="notion-inline-code">emailEnabled</code></span><span class="notion-default">、</span><span class="notion-default"><code class="notion-inline-code">emailHost</code></span><span class="notion-default">、</span><span class="notion-default"><code class="notion-inline-code">emailPort</code></span><span class="notion-default">、</span><span class="notion-default"><code class="notion-inline-code">emailUser</code></span></div></td></tr><tr class="notion-simple-table-row notion-block-3459b82ce220810d8204e038eaa5239e"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">定时任务</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default"><code class="notion-inline-code">scheduledTasks</code></span><span class="notion-default"> 数组</span></div></td></tr></tbody></table><div class="notion-text notion-block-3459b82ce22081e893fac8eed35d55d4"><span class="notion-default">设置通过 Obsidian 的 </span><span class="notion-default"><code class="notion-inline-code">loadData()</code></span><span class="notion-default"> 和 </span><span class="notion-default"><code class="notion-inline-code">saveData()</code></span><span class="notion-default"> API 持久化存储。</span></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3459b82ce22081b0b2e4c6888ebf95b0" data-id="3459b82ce22081b0b2e4c6888ebf95b0"><span><div id="3459b82ce22081b0b2e4c6888ebf95b0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce22081b0b2e4c6888ebf95b0" title="OpenCode 适配器"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">OpenCode 适配器</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3459b82ce220812caf44c7772db61132" data-id="3459b82ce220812caf44c7772db61132"><span><div id="3459b82ce220812caf44c7772db61132" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce220812caf44c7772db61132" title="HTTP + SSE 双通道通信"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">HTTP + SSE 双通道通信</span></span></span></h4><div class="notion-text notion-block-3459b82ce22081babe23f14771a73097"><span class="notion-default"><code class="notion-inline-code">OpenCodeAdapter</code></span><span class="notion-default"> 类实现了与 OpenCode CLI 后端的双通道通信：</span></div><ol start="1" class="notion-list notion-list-numbered notion-block-3459b82ce2208146b164df84372ba293" style="list-style-type:decimal"><li><span class="notion-default"><b>HTTP REST API</b></span><span class="notion-default">：用于创建 session、发送消息、查询状态</span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-3459b82ce220814d8216caa10bf723a1" style="list-style-type:decimal"><li><span class="notion-default"><b>SSE 事件流</b></span><span class="notion-default">：用于接收流式响应，实时更新对话内容</span></li></ol><div class="notion-text notion-block-3459b82ce220815ea929dd8b5bcbda9b"><span class="notion-default">连接流程：</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3459b82ce22081f995d3c8851c94a41d" data-id="3459b82ce22081f995d3c8851c94a41d"><span><div id="3459b82ce22081f995d3c8851c94a41d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce22081f995d3c8851c94a41d" title="会话管理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">会话管理</span></span></span></h4><div class="notion-text notion-block-3459b82ce22081a8a30dd1eaaa3d0d68"><span class="notion-default">每个对话窗口对应一个独立的 session。session 创建时指定工作目录（cwd），确保文件操作限定在当前 Obsidian 仓库内。</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3459b82ce22081278970d062fef71e03" data-id="3459b82ce22081278970d062fef71e03"><span><div id="3459b82ce22081278970d062fef71e03" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce22081278970d062fef71e03" title="流式消息处理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">流式消息处理</span></span></span></h4><div class="notion-text notion-block-3459b82ce2208127b39bd734e39dd39e"><span class="notion-default">SSE 连接接收的事件类型包括：</span></div><table class="notion-simple-table notion-block-3459b82ce22081f0b6ddefe517ed332b"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-3459b82ce22081f2af4ee349e394724f"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">事件类型</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">说明</span></div></td></tr><tr class="notion-simple-table-row notion-block-3459b82ce220818f8067ea993d4446b8"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default"><code class="notion-inline-code">assistant</code></span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">AI 文本回复，增量更新</span></div></td></tr><tr class="notion-simple-table-row notion-block-3459b82ce22081689d28e0935a898f55"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default"><code class="notion-inline-code">tool_call</code></span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">工具调用开始，显示工具名和参数</span></div></td></tr><tr class="notion-simple-table-row notion-block-3459b82ce2208155af18e253d39718df"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default"><code class="notion-inline-code">tool_result</code></span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">工具执行结果</span></div></td></tr><tr class="notion-simple-table-row notion-block-3459b82ce2208199a8aec64aeda841d6"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default"><code class="notion-inline-code">task_finish</code></span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">任务完成标记</span></div></td></tr></tbody></table><div class="notion-text notion-block-3459b82ce2208151ac53d515cd45945e"><span class="notion-default">通过 </span><span class="notion-default"><code class="notion-inline-code">pendingMessages</code></span><span class="notion-default"> 队列和 </span><span class="notion-default"><code class="notion-inline-code">AsyncIterable</code></span><span class="notion-default"> 接口，实现非阻塞的消息流式推送。</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3459b82ce2208120a000e25c3bfd1f9b" data-id="3459b82ce2208120a000e25c3bfd1f9b"><span><div id="3459b82ce2208120a000e25c3bfd1f9b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce2208120a000e25c3bfd1f9b" title="idle 防抖机制"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">idle 防抖机制</span></span></span></h4><div class="notion-text notion-block-3459b82ce2208169a550d07045442725"><span class="notion-default">为避免 Agent 工具调用间隙误触发 </span><span class="notion-default"><code class="notion-inline-code">task_finish</code></span><span class="notion-default">，插件实现了 idle 防抖：</span></div><div class="notion-text notion-block-3459b82ce22081afb64dc3635bd4d2a4"><span class="notion-default">只有在连续 500ms 无新事件时，才发送任务完成信号。</span></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3459b82ce22081f8a987d95bd2cedd1b" data-id="3459b82ce22081f8a987d95bd2cedd1b"><span><div id="3459b82ce22081f8a987d95bd2cedd1b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce22081f8a987d95bd2cedd1b" title="BM25 搜索引擎"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">BM25 搜索引擎</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3459b82ce220811eb42deb23d714fa42" data-id="3459b82ce220811eb42deb23d714fa42"><span><div id="3459b82ce220811eb42deb23d714fa42" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce220811eb42deb23d714fa42" title="索引构建"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">索引构建</span></span></span></h4><div class="notion-text notion-block-3459b82ce2208168b7f1f8db3d80d493"><span class="notion-default"><code class="notion-inline-code">WeightedSearchIndex</code></span><span class="notion-default"> 类实现了 BM25 算法的变种，支持中英文混合检索：</span></div><div class="notion-text notion-block-3459b82ce22081b68080e964daef34d6"><span class="notion-default">中文处理采用 n-gram 分词，避免词表依赖：</span></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-3459b82ce220818682f0fc696d77ff82"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://xz.sanrenjz.com/image/obsidian%E6%8F%92%E4%BB%B6-OpenCode%20AI%E5%8A%A9%E6%89%8B-16x9.png?imageSlim=&amp;spaceId=0ffd71f6-046a-4fc3-b642-5699b7c5ef56&amp;t=3459b82c-e220-8186-82f0-fc696d77ff82" alt="notion image" loading="lazy" decoding="async"/></div></figure><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3459b82ce22081afb0bce31826276855" data-id="3459b82ce22081afb0bce31826276855"><span><div id="3459b82ce22081afb0bce31826276855" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce22081afb0bce31826276855" title="搜索算法"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">搜索算法</span></span></span></h4><div class="notion-text notion-block-3459b82ce220816c8102ed57d1563a27"><span class="notion-default">BM25 评分公式：</span></div><div class="notion-text notion-block-3459b82ce22081f498bcdd3f029fa75c"><span class="notion-default">关键参数：</span></div><ul class="notion-list notion-list-disc notion-block-3459b82ce22081b08d53d0aeecdfec7d"><li><span class="notion-default"><code class="notion-inline-code">k1</code></span><span class="notion-default">：词频饱和系数（默认 1.2）</span></li></ul><ul class="notion-list notion-list-disc notion-block-3459b82ce22081c09259de6afeb55bc4"><li><span class="notion-default"><code class="notion-inline-code">b</code></span><span class="notion-default">：文档长度归一化系数（默认 0.75）</span></li></ul><div class="notion-text notion-block-3459b82ce220815e826ed5f04cfc22cb"><span class="notion-default">用户可通过 </span><span class="notion-default"><code class="notion-inline-code">searchKeywordWeights</code></span><span class="notion-default"> 自定义关键词权重，提升重要词汇的检索优先级。</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3459b82ce22081d58060e54d80082983" data-id="3459b82ce22081d58060e54d80082983"><span><div id="3459b82ce22081d58060e54d80082983" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce22081d58060e54d80082983" title="搜索结果处理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">搜索结果处理</span></span></span></h4><div class="notion-text notion-block-3459b82ce22081abbd3fded96c52da9e"><span class="notion-default"><code class="notion-inline-code">search()</code></span><span class="notion-default"> 方法返回结构化结果：</span></div><div class="notion-text notion-block-3459b82ce220816081c0eefe70345617"><span class="notion-default">每个结果包含：</span></div><ul class="notion-list notion-list-disc notion-block-3459b82ce220816d9fadea1132cfe00a"><li><span class="notion-default"><code class="notion-inline-code">docId</code></span><span class="notion-default">、</span><span class="notion-default"><code class="notion-inline-code">path</code></span><span class="notion-default">、</span><span class="notion-default"><code class="notion-inline-code">title</code></span><span class="notion-default">：文档定位信息</span></li></ul><ul class="notion-list notion-list-disc notion-block-3459b82ce220813b8f31fba5ef2e288c"><li><span class="notion-default"><code class="notion-inline-code">snippet</code></span><span class="notion-default">：智能截取的上下文摘要</span></li></ul><ul class="notion-list notion-list-disc notion-block-3459b82ce220816e9972da93a9e1d8f7"><li><span class="notion-default"><code class="notion-inline-code">score</code></span><span class="notion-default">：BM25 评分</span></li></ul><ul class="notion-list notion-list-disc notion-block-3459b82ce22081f38401d124322acc50"><li><span class="notion-default"><code class="notion-inline-code">matches</code></span><span class="notion-default">：匹配词的统计信息</span></li></ul><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3459b82ce22081acbadbcdbd68d455be" data-id="3459b82ce22081acbadbcdbd68d455be"><span><div id="3459b82ce22081acbadbcdbd68d455be" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce22081acbadbcdbd68d455be" title="Skills 路径解析"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">Skills 路径解析</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3459b82ce22081a887b4caee892ca669" data-id="3459b82ce22081a887b4caee892ca669"><span><div id="3459b82ce22081a887b4caee892ca669" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce22081a887b4caee892ca669" title="路径规范化"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">路径规范化</span></span></span></h4><div class="notion-text notion-block-3459b82ce22081a994cccd25529f8c24"><span class="notion-default"><code class="notion-inline-code">skills-paths.js</code></span><span class="notion-default"> 提供路径规范化函数：</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3459b82ce2208153b6b7e35a2c700e31" data-id="3459b82ce2208153b6b7e35a2c700e31"><span><div id="3459b82ce2208153b6b7e35a2c700e31" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce2208153b6b7e35a2c700e31" title="绝对路径识别"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">绝对路径识别</span></span></span></h4><div class="notion-text notion-block-3459b82ce22081909d2cf9f7e996f952"><span class="notion-default">Windows 绝对路径判断：</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3459b82ce22081dc9917c67b6019c893" data-id="3459b82ce22081dc9917c67b6019c893"><span><div id="3459b82ce22081dc9917c67b6019c893" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce22081dc9917c67b6019c893" title="Skills 目录同步"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">Skills 目录同步</span></span></span></h4><div class="notion-text notion-block-3459b82ce2208165b8aec4dcb42b88e3"><span class="notion-default"><code class="notion-inline-code">ensureProjectSkills()</code></span><span class="notion-default"> 自动将 Skills 目录链接/复制到项目工作目录：</span></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3459b82ce220819298b6e432f0acc348" data-id="3459b82ce220819298b6e432f0acc348"><span><div id="3459b82ce220819298b6e432f0acc348" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce220819298b6e432f0acc348" title="定时任务系统"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">定时任务系统</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3459b82ce22081729116c6ad48d154bd" data-id="3459b82ce22081729116c6ad48d154bd"><span><div id="3459b82ce22081729116c6ad48d154bd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce22081729116c6ad48d154bd" title="任务数据结构"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">任务数据结构</span></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3459b82ce22081508f8bc10f64ee8741" data-id="3459b82ce22081508f8bc10f64ee8741"><span><div id="3459b82ce22081508f8bc10f64ee8741" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce22081508f8bc10f64ee8741" title="三种写入模式"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">三种写入模式</span></span></span></h4><table class="notion-simple-table notion-block-3459b82ce220818cb115f43a4c5a347f"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-3459b82ce220812cbf59c4a9194d617b"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">模式</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">行为</span></div></td></tr><tr class="notion-simple-table-row notion-block-3459b82ce22081ba9b3ac33e84fc31ee"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default"><b>save</b></span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">AI 结果写入 targetPath 指定文件夹的新文件</span></div></td></tr><tr class="notion-simple-table-row notion-block-3459b82ce22081e29bded72a0285402a"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default"><b>insert</b></span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">解析 sourcePath 中的 </span><span class="notion-default"><code class="notion-inline-code">[[WikiLink]]</code></span><span class="notion-default">，结果追加到被引用文件末尾</span></div></td></tr><tr class="notion-simple-table-row notion-block-3459b82ce22081bcbcdfefefe2e92cbd"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default"><b>replace</b></span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">解析 WikiLink，结果覆盖被引用文件</span></div></td></tr></tbody></table><div class="notion-text notion-block-3459b82ce2208156b2f5d84977fab3db"><span class="notion-default">WikiLink 解析示例：</span></div><div class="notion-text notion-block-3459b82ce220811e8677e7edf3823912"><span class="notion-default">插件读取 </span><span class="notion-default"><code class="notion-inline-code">测试3.md</code></span><span class="notion-default"> 内容，嵌入提示词，发送给 AI，然后将翻译结果写入 </span><span class="notion-default"><code class="notion-inline-code">测试3.md</code></span><span class="notion-default">（insert 或 replace）。</span></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3459b82ce220810a8394c87514b1ed3a" data-id="3459b82ce220810a8394c87514b1ed3a"><span><div id="3459b82ce220810a8394c87514b1ed3a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce220810a8394c87514b1ed3a" title="邮件通知系统"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">邮件通知系统</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3459b82ce22081ceb65ec9b32cc6e966" data-id="3459b82ce22081ceb65ec9b32cc6e966"><span><div id="3459b82ce22081ceb65ec9b32cc6e966" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce22081ceb65ec9b32cc6e966" title="SMTP 配置"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">SMTP 配置</span></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3459b82ce22081d9af46d52d819b3d95" data-id="3459b82ce22081d9af46d52d819b3d95"><span><div id="3459b82ce22081d9af46d52d819b3d95" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce22081d9af46d52d819b3d95" title="发送流程"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">发送流程</span></span></span></h4><div class="notion-text notion-block-3459b82ce22081beb6c5e28356253913"><span class="notion-default">任务完成后，调用 Node.js 内置 </span><span class="notion-default"><code class="notion-inline-code">tls</code></span><span class="notion-default"> 模块发送邮件：</span></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3459b82ce22081bfbf1ae4bc6f99202c" data-id="3459b82ce22081bfbf1ae4bc6f99202c"><span><div id="3459b82ce22081bfbf1ae4bc6f99202c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce22081bfbf1ae4bc6f99202c" title="流程图"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">流程图</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3459b82ce22081e1be15ea140923335a" data-id="3459b82ce22081e1be15ea140923335a"><span><div id="3459b82ce22081e1be15ea140923335a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3459b82ce22081e1be15ea140923335a" title="主要改进点说明："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">主要改进点说明：</span></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-3459b82ce22081ff9da8d77092f4a9b6" style="list-style-type:decimal"><li><span class="notion-default"><b>服务自愈闭环</b></span><span class="notion-default">：</span></li><ol class="notion-list notion-list-numbered notion-block-3459b82ce22081ff9da8d77092f4a9b6" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-3459b82ce22081a58c56f578e20bbb59"><li><span class="notion-default">当检查到“不健康”时，增加“杀掉进程”并指向“启动服务”的逻辑，确保流程能走通。</span></li></ul><ul class="notion-list notion-list-disc notion-block-3459b82ce22081ff8726f28ed66ab6b0"><li><span class="notion-default">启动成功后统一进入 </span><span class="notion-default"><code class="notion-inline-code">Session</code></span><span class="notion-default"> 创建阶段。</span></li></ul></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-3459b82ce2208104aca9cf2b43e15708" style="list-style-type:decimal"><li><span class="notion-default"><b>工具调用集成 (Tool Call Integration)</b></span><span class="notion-default">：</span></li><ol class="notion-list notion-list-numbered notion-block-3459b82ce2208104aca9cf2b43e15708" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-3459b82ce22081d2a1a6d3f1686786dd"><li><span class="notion-default">将原本孤立的“搜索模块”和“定时任务”通过 </span><span class="notion-default"><code class="notion-inline-code">tool_call</code></span><span class="notion-default"> 事件连接。</span></li></ul><ul class="notion-list notion-list-disc notion-block-3459b82ce220813087b3d0f89b026c71"><li><span class="notion-default"><b>核心逻辑改进</b></span><span class="notion-default">：工具执行完（</span><span class="notion-default"><code class="notion-inline-code">R</code></span><span class="notion-default"> 节点）后，流程指向了 </span><span class="notion-default"><code class="notion-inline-code">M (HTTP POST /message)</code></span><span class="notion-default">。这是符合 AI Agent 逻辑的：AI 调用工具 -&gt; 得到结果 -&gt; 带着结果再次请求 AI -&gt; AI 总结回复。</span></li></ul></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-3459b82ce220812abd31ee5f7635e9c0" style="list-style-type:decimal"><li><span class="notion-default"><b>增加等待状态</b></span><span class="notion-default">：</span></li><ol class="notion-list notion-list-numbered notion-block-3459b82ce220812abd31ee5f7635e9c0" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-3459b82ce22081829924e1f864621f79"><li><span class="notion-default">增加了 </span><span class="notion-default"><code class="notion-inline-code">L[等待用户输入]</code></span><span class="notion-default">，使得流程在任务完成后能回到待命状态，形成交互闭环。</span></li></ul></ol></ol><ol start="4" class="notion-list notion-list-numbered notion-block-3459b82ce2208151884cd110c9619484" style="list-style-type:decimal"><li><span class="notion-default"><b>搜索模块内部细节优化</b></span><span class="notion-default">：</span></li><ol class="notion-list notion-list-numbered notion-block-3459b82ce2208151884cd110c9619484" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-3459b82ce220818380d2cdf5bef9cb3b"><li><span class="notion-default">将搜索逻辑从“用户触发”改为“提取关键词”，因为在 AI 场景下，搜索通常是由 AI 根据用户意图发起的。</span></li></ul></ol></ol><ol start="5" class="notion-list notion-list-numbered notion-block-3459b82ce22081d7a30ec544dbfc2346" style="list-style-type:decimal"><li><span class="notion-default"><b>定时任务执行逻辑</b></span><span class="notion-default">：</span></li><ol class="notion-list notion-list-numbered notion-block-3459b82ce22081d7a30ec544dbfc2346" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-3459b82ce22081038cf0f4a5f737ec36"><li><span class="notion-default">明确了从解析到注册再到触发的异步过程。</span></li></ul></ol></ol><div class="notion-text notion-block-3459b82ce220810083d9f4acb7f25966"><span class="notion-default">这样修改后的流程图更符合一个</span><span class="notion-default"><b>基于 SSE 的 AI 插件/Agent</b></span><span class="notion-default"> 的真实运行机制。</span></div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CodeBot：基于OpenCode的AI助手-架构、功能和代码全解读]]></title>
            <link>https://docs.sanrenjz.com/article/CodeBot：基于 OpenCode 的 AI 助手实战：架构、功能和代码全解读</link>
            <guid>https://docs.sanrenjz.com/article/CodeBot：基于 OpenCode 的 AI 助手实战：架构、功能和代码全解读</guid>
            <pubDate>Wed, 25 Mar 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[项目为三人聚智的开源项目，可以到 github：yuhanbo758/codebot 或 gitee：yuhanbo758/codebot 拉取项目，或releases 或到夸克下载，亦可前往程序小店]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-3449b82ce220816d8eacc6c4e59974d9"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-3449b82ce2208145977bd46bb7c48a44"><span class="notion-default">项目为三人聚智的开源项目，可以到 </span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/yuhanbo758/codebot">github：yuhanbo758/codebot</a></span><span class="notion-default"> 或 </span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://gitee.com/yuhanbo758/codebot">gitee：yuhanbo758/codebot</a></span><span class="notion-default"> 拉取项目，或releases 或到</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://pan.quark.cn/s/32af0c9b87cc">夸克</a></span><span class="notion-default">下载，亦可前往程序小店。</span></div><div class="notion-text notion-block-3449b82ce22081d78a03dacd61ac0c1a"><span class="notion-default">程序小店：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://shop.sanrenjz.com/product/69c1dafed64de6758c5268bd">程序小店 - 虚拟商品销售平台</a></span></div><div class="notion-text notion-block-3449b82ce22081a1a4aedb151fe47360"><span class="notion-default">bili 视频 1：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.bilibili.com/video/BV1ejXnB2ExS/">Codebot-基于OpenCode的个人龙虾AI助手_哔哩哔哩_bilibili</a></span></div><div class="notion-text notion-block-3449b82ce2208126b66ac7be0278162f"><span class="notion-default">bili 视频 2：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.bilibili.com/video/BV1QrDTBNEy4/?vd_source=247ac77d4ae7339ea06d0fec09aa8f70#reply116345983206547">Codebot-基于OpenCode的个人龙虾AI助手-2_哔哩哔哩_bilibili</a></span></div><div class="notion-text notion-block-3449b82ce2208171883ee867826666ec"><span class="notion-default">bili 视频 3：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.bilibili.com/video/BV1iDSRB6EN1/?vd_source=247ac77d4ae7339ea06d0fec09aa8f70">Codebot-基于OpenCode的个人龙虾AI助手3_哔哩哔哩_bilibili</a></span></div><div class="notion-text notion-block-3449b82ce22081759d59e1b4bcf97be6"><span class="notion-default">bili 视频 4：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.bilibili.com/video/BV1tGQPBpEtc/?vd_source=247ac77d4ae7339ea06d0fec09aa8f70">CodeBot：基于OpenCode的AI助手-4_哔哩哔哩_bilibili</a></span></div><div class="notion-text notion-block-3449b82ce220812286ffe2c26caefd53"><span class="notion-default">bili 视频 5：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.bilibili.com/video/BV1UqdeBnERr/?vd_source=247ac77d4ae7339ea06d0fec09aa8f70">CodeBot：基于OpenCode的AI助手-5_哔哩哔哩_bilibili</a></span></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3449b82ce2208153b1abf1e6fe722f8d" data-id="3449b82ce2208153b1abf1e6fe722f8d"><span><div id="3449b82ce2208153b1abf1e6fe722f8d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce2208153b1abf1e6fe722f8d" title="2.8.0 版本更新"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">2.8.0 版本更新</span></span></span></h2><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3449b82ce22081daa7c4d499e3bb7f36" data-id="3449b82ce22081daa7c4d499e3bb7f36"><span><div id="3449b82ce22081daa7c4d499e3bb7f36" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce22081daa7c4d499e3bb7f36" title="一、代码修改与功能新增"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">一、</span><span class="notion-default"><b>代码修改与功能新增</b></span></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-3449b82ce2208192b1ecf3ea118cd85e" style="list-style-type:decimal"><li><span class="notion-default"><b>对话命名优化</b></span></li><ol class="notion-list notion-list-numbered notion-block-3449b82ce2208192b1ecf3ea118cd85e" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-3449b82ce22081ef9fc0c6ed02f46eb4"><li><span class="notion-default">修改对话命名规则，使用 AI 总结对话内容进行命名（20 字以内）。</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce2208126978ef658f703ff9c"><li><span class="notion-default"><b>优化生成时间</b></span><span class="notion-default">：AI 回复后立即生成对话名称，仅截取回复内容的前 300-500 字以减少 Token 消耗。</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081b9b3d9cbccd940089c"><li><span class="notion-default"><b>修复显示刷新延迟</b></span><span class="notion-default">：对话名称生成后即时刷新显示，无需切换界面才可见。</span></li></ul></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-3449b82ce220819187e1e1fb9678e16d" style="list-style-type:decimal"><li><span class="notion-default"><b>本地模型网关/代理层调整</b></span></li><ol class="notion-list notion-list-numbered notion-block-3449b82ce220819187e1e1fb9678e16d" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-3449b82ce22081c59a1de90098c9deb7"><li><span class="notion-default">测试“本地模型网关/代理层”架构，成功后提供 Python 调用教程（中文版）。</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081a0ab48e4355e14c877"><li><span class="notion-default"><b>增强模型调用逻辑</b></span><span class="notion-default">：</span></li><ul class="notion-list notion-list-disc notion-block-3449b82ce22081a0ab48e4355e14c877"><li><span class="notion-default">默认情况下，若用户未指定模型，自动调用当前 CodeBot 聊天默认模型。</span></li><li><span class="notion-default">若模型参数为空值时，使用“记忆-&gt;自动整理-&gt;整理使用模型”作为模型来源。</span></li></ul></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081259695fb667a2557eb"><li><span class="notion-default"><b>修复接口调用问题</b></span><span class="notion-default">：解决示例代码中模型为空时不调用默认模型的 Bug。</span></li></ul></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-3449b82ce220813ea513c9230305ce8d" style="list-style-type:decimal"><li><span class="notion-default"><b>文档功能完善</b></span></li><ol class="notion-list notion-list-numbered notion-block-3449b82ce220813ea513c9230305ce8d" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-3449b82ce22081289689f2a3dd04e192"><li><span class="notion-default">在菜单栏“设置”右侧新增“文档”入口。</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220818c857ef621a1bb39f9"><li><span class="notion-default"><b>文档内容加载</b></span><span class="notion-default">：解决“文档没有内容，加载失败（HTTP 404）”问题，确保文档路径正确。</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081489eb4f1de5d04d017"><li><span class="notion-default"><b>优化 Markdown 渲染</b></span><span class="notion-default">：修复文档中网络图片无法显示、代码块渲染不良等相关问题。</span></li></ul></ol></ol><ol start="4" class="notion-list notion-list-numbered notion-block-3449b82ce220812bbc8bce508f701170" style="list-style-type:decimal"><li><span class="notion-default"><b>技能沉淀与沙箱检查</b></span></li><ol class="notion-list notion-list-numbered notion-block-3449b82ce220812bbc8bce508f701170" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-3449b82ce2208144aa9adbd1c12c54ed"><li><span class="notion-default"><b>技能沉淀功能</b></span><span class="notion-default">：检查技能沉淀逻辑是否正常，确保当日聊天内容可以被记忆、定时任务处理和复杂重复性内容可自动生成技能。</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce2208188995dd2cb5bb50504"><li><span class="notion-default"><b>沙箱与性能检查</b></span><span class="notion-default">：检查沙箱功能是否存在问题，分析高 CPU/内存占用是否由异常进程或重复运行的程序引起，修复潜在卡顿问题。</span></li></ul></ol></ol><hr class="notion-hr notion-block-3449b82ce220817d98efde0b3041a5e0"/><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3449b82ce2208112bb3ae95cd82f82ba" data-id="3449b82ce2208112bb3ae95cd82f82ba"><span><div id="3449b82ce2208112bb3ae95cd82f82ba" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce2208112bb3ae95cd82f82ba" title="二、Bug 修复与优化"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">二、</span><span class="notion-default"><b>Bug 修复与优化</b></span></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-3449b82ce22081cb9444c01ee4750466" style="list-style-type:decimal"><li><span class="notion-default"><b>修复 CodeBot 启动冲突</b></span><span class="notion-default">：解决 Opencode 桌面端无法打开 CodeBot 并报错“Network service crashed”的问题。</span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-3449b82ce2208115a2ccd9c30c1c45c4" style="list-style-type:decimal"><li><span class="notion-default"><b>提升 CodeBot 启动速度</b></span><span class="notion-default">：检查 </span><span class="notion-default"><code class="notion-inline-code">npm start</code></span><span class="notion-default"> 启动缓慢问题，优化界面加载顺序，优先显示界面以增强用户体验。</span></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-3449b82ce22081f1b158fb65358651cf" style="list-style-type:decimal"><li><span class="notion-default"><b>优化文档与对话展示</b></span><span class="notion-default">：修复对话名称延迟刷新及文档渲染错误，提升系统响应速度与稳定性。</span></li></ol><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-3449b82ce220819fa5efc96f6a5e075c" data-id="3449b82ce220819fa5efc96f6a5e075c"><span><div id="3449b82ce220819fa5efc96f6a5e075c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce220819fa5efc96f6a5e075c" title="项目"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">项目</span></span></span></h2><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3449b82ce22081108712f14efb0d2b93" data-id="3449b82ce22081108712f14efb0d2b93"><span><div id="3449b82ce22081108712f14efb0d2b93" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce22081108712f14efb0d2b93" title="一、项目概述"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">一、项目概述</span></span></span></h3><div class="notion-text notion-block-3449b82ce22081bb963afa7e4a42ee3a"><span class="notion-default">Codebot 是一款基于 OpenCode 平台打造的个人 AI 助手，具有跨平台、多通信渠道（飞书、邮箱）、丰富技能系统与高效记忆管理能力。项目以 Python3.11+ 为后端主力，配合 Electron 桌面端和 Vue3 前端，为开发者和普通用户提供灵活、智能、高扩展性的效率工具环境。</span></div><div class="notion-text notion-block-3449b82ce2208103ba1ff6dc0ba43014"><span class="notion-default">本项目的主功能包括：</span></div><ul class="notion-list notion-list-disc notion-block-3449b82ce22081d89321d164f600c7a7"><li><span class="notion-default">与 OpenCode 服务无缝集成，支持多模型切换与自主决策</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081088893d1a1766cf342"><li><span class="notion-default">实现对用户信息、习惯、偏好的自动提取与记忆提示</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081609728d61abd08e0cf"><li><span class="notion-default">完备的定时任务、通知、日志、技能、MCP 集成与管理</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220813a9d8cc63d57470373"><li><span class="notion-default">安全隔离的沙箱执行环境，大幅提升代码生成和运行的灵活性与安全性</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081a483d4ec0115b69028"><li><span class="notion-default">跨平台兼容（支持 Windows、Linux、macOS，及 Electron 桌面端）</span></li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3449b82ce22081ee9cb0c2abff14a5bb" data-id="3449b82ce22081ee9cb0c2abff14a5bb"><span><div id="3449b82ce22081ee9cb0c2abff14a5bb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce22081ee9cb0c2abff14a5bb" title="二、功能结构与主流程"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">二、功能结构与主流程</span></span></span></h3><div class="notion-text notion-block-3449b82ce22081d38caee1753bb31f98"><span class="notion-default">整体架构采用分层+模块化设计，后端核心为 FastAPI 应用，按 REST API 暴露对话、记忆、定时任务、技能、配置等服务路由，配合 memory（ChromaDB+SQLite）、opencode 客户端、沙箱管理和多前端适配。</span></div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3449b82ce2208103995de0acb2acb413" data-id="3449b82ce2208103995de0acb2acb413"><span><div id="3449b82ce2208103995de0acb2acb413" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce2208103995de0acb2acb413" title="2.1 主模块启动流程"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">2.1 主模块启动流程</span></span></span></h4><div class="notion-text notion-block-3449b82ce220815c80d9cfd2fe46ebb2"><span class="notion-default">主模块逻辑及流程：</span></div><ul class="notion-list notion-list-disc notion-block-3449b82ce2208171b783f3e60153d919"><li><span class="notion-default">应用初始化 → 数据/技能/日志/备份目录校验与创建 → 内置技能复制</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081259160f7a2df665882"><li><span class="notion-default">依赖检查与自动安装（OpenCode）</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce2208104b5a4c7b8eeb203f4"><li><span class="notion-default">连接数据库并初始化表结构</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220816687daea4a905d8706"><li><span class="notion-default">各全局核心组件实例化（内存管理、通知、WS 机器人、沙箱等）</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081288b23f11a59599740"><li><span class="notion-default">API 路由加载（chat/memory/scheduler/skills/config/mcp/etc.）</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081fd80f5fe90411df131"><li><span class="notion-default">沙箱环境启动与端口自适应检测</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081508a84e9795cfbaa6f"><li><span class="notion-default">异步启动 OpenCode Server 并接管后端与技能调度</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220814bba58e21c57af6bff"><li><span class="notion-default">前端静态资源挂载、SPA 路由回退</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220816ab217da87d07baa8a"><li><span class="notion-default">应用关闭时 graceful shutdown，停止后台任务、断开连接</span></li></ul><div class="notion-text notion-block-3449b82ce22081389a4bc867e45a215a"><span class="notion-default">以 main.py 为核心入口，调动 config、database、core（opencode_ws/memory_manager/scheduler等）、services、skills、api、沙箱子模块共同完成项目启动、生命周期管理及功能扩展。</span></div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3449b82ce2208157a45fcd95523cb95a" data-id="3449b82ce2208157a45fcd95523cb95a"><span><div id="3449b82ce2208157a45fcd95523cb95a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce2208157a45fcd95523cb95a" title="2.2 Codebot 作为第三方的工作方式"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">2.2 Codebot 作为第三方的工作方式</span></span></span></h4><div class="notion-text notion-block-3449b82ce22081d68dfaefb1a37d0a2a"><span class="notion-default">OpenCode 是主聊天入口，负责模型选择、推理、工具决策与最终回答。Codebot 通过 </span><span class="notion-default"><code class="notion-inline-code">/api/mcp/codebot/sse</code></span><span class="notion-default"> 暴露第三方 MCP，向 OpenCode 提供记忆、任务、技能、会话等工具。Codebot 会把&quot;第三方 MCP&quot;页面中启用的远程 MCP 工具代理成 </span><span class="notion-default"><code class="notion-inline-code">codebot_mcp__...</code></span><span class="notion-default"> 形式的工具名，再暴露给 OpenCode。Codebot 会把 </span><span class="notion-default"><code class="notion-inline-code">skills/</code></span><span class="notion-default"> 目录中的技能同步到 OpenCode 技能目录，使其作为第三方技能被直接调用。</span></div><div class="notion-text notion-block-3449b82ce22081af8573e74cd3fdd5a9"><span class="notion-default">聊天请求发往 OpenCode 时只附带必要的用户记忆上下文，不再由 Codebot 预判技能或代替 OpenCode 做二次工具编排。</span><span class="notion-default"><code class="notion-inline-code">backend/core/tool_dispatcher.py</code></span><span class="notion-default"> 已收敛为桥接辅助模块，仅负责技能发现与 MCP 协议适配，不再承担聊天主链路上的工具调度。</span></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-3449b82ce220815bae2dfa88555fc64d"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://xz.sanrenjz.com/image/Codebot-%E4%B8%AA%E4%BA%BAAI%E5%8A%A9%E6%89%8B-16x9.webp?imageSlim=&amp;spaceId=0ffd71f6-046a-4fc3-b642-5699b7c5ef56&amp;t=3449b82c-e220-815b-ae2d-fa88555fc64d" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3449b82ce22081d8b5b3f84e619ed4f2" data-id="3449b82ce22081d8b5b3f84e619ed4f2"><span><div id="3449b82ce22081d8b5b3f84e619ed4f2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce22081d8b5b3f84e619ed4f2" title="三、核心功能详解"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">三、核心功能详解</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3449b82ce22081b8b33cc426e1e5a012" data-id="3449b82ce22081b8b33cc426e1e5a012"><span><div id="3449b82ce22081b8b33cc426e1e5a012" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce22081b8b33cc426e1e5a012" title="3.1 OpenCode 会话系统"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">3.1 OpenCode 会话系统</span></span></span></h4><ul class="notion-list notion-list-disc notion-block-3449b82ce22081f797a6f695037b1d18"><li><span class="notion-default"><b>对话管理</b></span><span class="notion-default">: 创建和管理多个对话，支持重命名、置顶、归档、删除</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220819e91fff3f76ab57653"><li><span class="notion-default"><b>OpenCode 主控</b></span><span class="notion-default">: 所有消息统一交给 OpenCode 处理，Codebot 只负责提供第三方能力和结果展示</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081de857fec58e376b459"><li><span class="notion-default"><b>历史查看</b></span><span class="notion-default">: 进入&quot;聊天&quot;自动打开最近对话，支持多对话并行处理</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081d4be18f8e2c128cac6"><li><span class="notion-default"><b>分组聊天</b></span><span class="notion-default">: 支持将多个对话合并为群组模式</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce2208116ba0de24d0cb4bf66"><li><span class="notion-default"><b>对话分享</b></span><span class="notion-default">: 生成分享链接（</span><span class="notion-default"><code class="notion-inline-code">share_id</code></span><span class="notion-default">），可供他人只读查看</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220810ab220c01d9adf090d"><li><span class="notion-default"><b>意图分类</b></span><span class="notion-default">: 消息自动分类为&quot;定时任务/保存记忆/普通对话&quot;，避免误判</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220812d89cdce4d13ae8033"><li><span class="notion-default"><b>Agent 模式</b></span><span class="notion-default">: 支持 </span><span class="notion-default"><code class="notion-inline-code">plan</code></span><span class="notion-default">（结构化规划）和 </span><span class="notion-default"><code class="notion-inline-code">build</code></span><span class="notion-default">（直接执行）两种模式</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081629739f527cc05143c"><li><span class="notion-default"><b>文件附件</b></span><span class="notion-default">: 支持文件附件上传；多模态模型支持图片分析</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081dd9c58fd3a3fccc48f"><li><span class="notion-default"><b>流式响应</b></span><span class="notion-default">: 流式展示 OpenCode 步骤事件（如 </span><span class="notion-default"><code class="notion-inline-code">step-start</code></span><span class="notion-default"> / </span><span class="notion-default"><code class="notion-inline-code">step-finish</code></span><span class="notion-default">）与回复增量</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220814bb3fdfe40fe22a0d5"><li><span class="notion-default"><b>会话复用</b></span><span class="notion-default">: 同一对话默认复用 OpenCode 会话，减少上下文丢失，提升连续追问一致性</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce2208197aa7ad42fdd292328"><li><span class="notion-default"><b>后台执行</b></span><span class="notion-default">: 切换到&quot;技能/设置&quot;等页面时，任务继续在后台执行，返回聊天页自动恢复状态并回放工具调用事件</span></li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3449b82ce22081b29562e77981a97552" data-id="3449b82ce22081b29562e77981a97552"><span><div id="3449b82ce22081b29562e77981a97552" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce22081b29562e77981a97552" title="3.2 记忆系统"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">3.2 记忆系统</span></span></span></h4><ul class="notion-list notion-list-disc notion-block-3449b82ce22081edb170f588611aaa78"><li><span class="notion-default"><b>上下文记忆</b></span><span class="notion-default">: 自动保存对话历史</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce2208166a7fce4e6bf2693cd"><li><span class="notion-default"><b>长期记忆</b></span><span class="notion-default">: 保存用户习惯、偏好、事实信息（用于之后对话检索问答）</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce2208138acd2c96def33b32c"><li><span class="notion-default"><b>自动提取</b></span><span class="notion-default">: 每次对话后，后台自动进行规则+AI双通道提取，识别重要信息并保存，无需依赖&quot;记住&quot;关键词</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce2208158bc8fc2605a431500"><li><span class="notion-default"><b>记忆类别</b></span><span class="notion-default">: </span><span class="notion-default"><code class="notion-inline-code">habit</code></span><span class="notion-default">（习惯）、</span><span class="notion-default"><code class="notion-inline-code">preference</code></span><span class="notion-default">（偏好）、</span><span class="notion-default"><code class="notion-inline-code">profile</code></span><span class="notion-default">（个人信息）、</span><span class="notion-default"><code class="notion-inline-code">note</code></span><span class="notion-default">（笔记）、</span><span class="notion-default"><code class="notion-inline-code">contact</code></span><span class="notion-default">（联系人）、</span><span class="notion-default"><code class="notion-inline-code">address</code></span><span class="notion-default">（地址）</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce2208186a608c658a619f8fa"><li><span class="notion-default"><b>记忆提示</b></span><span class="notion-default">: 聊天输入时自动检索相关记忆并在输入框上方显示提示气泡，AI 回复时也会注明&quot;根据我的记忆&quot;</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220816baeede6b4eb24312b"><li><span class="notion-default"><b>记忆搜索</b></span><span class="notion-default">: 语义搜索相关记忆</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220810ba87bf79a43919da0"><li><span class="notion-default"><b>记忆归档</b></span><span class="notion-default">: 自动或手动归档旧记忆，支持按类别过滤查看</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220813a94d5f20a5acbc986"><li><span class="notion-default"><b>备份恢复</b></span><span class="notion-default">: 导出记忆为 ZIP 文件（保存至 </span><span class="notion-default"><code class="notion-inline-code">data/backups/</code></span><span class="notion-default">），或上传备份文件恢复</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220816fa9c5d34462bdbfeb"><li><span class="notion-default"><b>记忆整理</b></span><span class="notion-default">: 每日在配置时间点（默认 03:00）自动用 AI 对活跃记忆进行优化（合并重复、补全描述、标准化格式、修正矛盾），也可手动触发</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220818cb336d1e97b1d0722"><li><span class="notion-default"><b>聊天整理联动</b></span><span class="notion-default">: 自动整理时会扫描新增聊天记录，从聊天中补充记忆，并尝试沉淀相关定时任务与可复用技能</span></li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3449b82ce2208141b564cb0c4052de0f" data-id="3449b82ce2208141b564cb0c4052de0f"><span><div id="3449b82ce2208141b564cb0c4052de0f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce2208141b564cb0c4052de0f" title="3.3 定时任务系统"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">3.3 定时任务系统</span></span></span></h4><ul class="notion-list notion-list-disc notion-block-3449b82ce2208184a5b3f2ee6f08b532"><li><span class="notion-default"><b>Cron 表达式</b></span><span class="notion-default">: 完整的 Cron 语法支持</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220815f8dccf53d8fc91727"><li><span class="notion-default"><b>智能时间解析</b></span><span class="notion-default">: 自动从用户消息中区分&quot;时间部分&quot;和&quot;任务内容&quot;。例如&quot;5分钟后，写首春天的诗保存到D盘&quot;会解析为：调度时间=5分钟后，任务=写首春天的诗保存到D盘</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081a49255e1c529ade473"><li><span class="notion-default"><b>意图识别</b></span><span class="notion-default">: 本地规则优先分流&quot;定时任务/记忆/普通对话&quot;，避免&quot;保存到D盘&quot;这类任务被误判为记忆</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081d7a4aed33775765dd6"><li><span class="notion-default"><b>生日提醒特例</b></span><span class="notion-default">: 对&quot;记住我的生日，10月20日，我生日时提醒我&quot;这类复合句，会同时保存生日记忆并创建每年生日提醒任务</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220819cb6aeee807d0d76e6"><li><span class="notion-default"><b>AI 辅助</b></span><span class="notion-default">: 自然语言生成 Cron 表达式（OpenCode 不可用时降级为本地规则解析）</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081dfafb5efc6994106d8"><li><span class="notion-default"><b>通知渠道</b></span><span class="notion-default">: 飞书/邮箱/应用内通知</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081b59099c58df3c79fb6"><li><span class="notion-default"><b>执行日志</b></span><span class="notion-default">: 详细的任务执行记录</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce2208149af0bf4335c72f25f"><li><span class="notion-default"><b>提醒任务</b></span><span class="notion-default">: 带 </span><span class="notion-default"><code class="notion-inline-code">__REMINDER__</code></span><span class="notion-default"> 标志的纯提醒任务不依赖 OpenCode 也能按计划触发通知；AI 类任务（生成内容/写文件等）需要 OpenCode 在线执行</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce2208143a080c94c42ffc2e1"><li><span class="notion-default"><b>像聊天一样执行</b></span><span class="notion-default">: 定时任务到达执行时间时，系统会像聊天一样通过 OpenCode CLI 处理任务内容，充分利用 AI 的代码生成与文件写入能力</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220817d9231c02ba8ab20bb"><li><span class="notion-default"><b>一次性任务</b></span><span class="notion-default">: 未强调重复性的任务（如&quot;5分钟后&quot;、&quot;明天&quot;）自动标记为一次性，执行完成后不再重复触发</span></li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3449b82ce220818b896dca80ff174145" data-id="3449b82ce220818b896dca80ff174145"><span><div id="3449b82ce220818b896dca80ff174145" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce220818b896dca80ff174145" title="3.4 技能系统"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">3.4 技能系统</span></span></span></h4><ul class="notion-list notion-list-disc notion-block-3449b82ce220811f9614d60aa3a1d98b"><li><span class="notion-default"><b>内置技能</b></span><span class="notion-default">: </span><span class="notion-default"><code class="notion-inline-code">web_search</code></span><span class="notion-default">（网页搜索）、</span><span class="notion-default"><code class="notion-inline-code">web_fetch</code></span><span class="notion-default">（抓取网页）、</span><span class="notion-default"><code class="notion-inline-code">news</code></span><span class="notion-default">（新闻获取）、</span><span class="notion-default"><code class="notion-inline-code">file_reader</code></span><span class="notion-default">（文件读取）、</span><span class="notion-default"><code class="notion-inline-code">pdf</code></span><span class="notion-default">（PDF 处理）、</span><span class="notion-default"><code class="notion-inline-code">docx</code></span><span class="notion-default">（Word 文档）、</span><span class="notion-default"><code class="notion-inline-code">pptx</code></span><span class="notion-default">（PowerPoint）、</span><span class="notion-default"><code class="notion-inline-code">xlsx</code></span><span class="notion-default">（Excel）、</span><span class="notion-default"><code class="notion-inline-code">ai-company</code></span><span class="notion-default">（AI 专家团队决策）、</span><span class="notion-default"><code class="notion-inline-code">expert-agents</code></span><span class="notion-default">（14位专家人设）、</span><span class="notion-default"><code class="notion-inline-code">code-review</code></span><span class="notion-default">（代码审查）、</span><span class="notion-default"><code class="notion-inline-code">writing-plans</code></span><span class="notion-default">（写作计划）、</span><span class="notion-default"><code class="notion-inline-code">subagent-driven-development</code></span><span class="notion-default">（子代理驱动开发）、</span><span class="notion-default"><code class="notion-inline-code">arxiv-research</code></span><span class="notion-default">（论文研究）、</span><span class="notion-default"><code class="notion-inline-code">blogwatcher</code></span><span class="notion-default">（博客监控）、</span><span class="notion-default"><code class="notion-inline-code">obsidian-notes</code></span><span class="notion-default">（Obsidian 笔记）、</span><span class="notion-default"><code class="notion-inline-code">self-improving</code></span><span class="notion-default">（自我改进）、</span><span class="notion-default"><code class="notion-inline-code">systematic-debugging</code></span><span class="notion-default">（系统化调试）、</span><span class="notion-default"><code class="notion-inline-code">test-driven-development</code></span><span class="notion-default">（测试驱动开发）</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce2208103b833cdf113cc1106"><li><span class="notion-default"><b>技能定义</b></span><span class="notion-default">: Markdown 文件（</span><span class="notion-default"><code class="notion-inline-code">SKILL.md</code></span><span class="notion-default">）带 YAML front-matter（</span><span class="notion-default"><code class="notion-inline-code">name</code></span><span class="notion-default">、</span><span class="notion-default"><code class="notion-inline-code">description</code></span><span class="notion-default">），自动匹配用户提示</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220816c8a35c80106fea63c"><li><span class="notion-default"><b>自动调度</b></span><span class="notion-default">: </span><span class="notion-default"><code class="notion-inline-code">tool_dispatcher.py</code></span><span class="notion-default"> 通过关键词 + 语义匹配，将 </span><span class="notion-default"><code class="notion-inline-code">SKILL.md</code></span><span class="notion-default"> 内容注入到对应请求的提示词中</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081f79a15f520068681d1"><li><span class="notion-default"><b>低干扰注入</b></span><span class="notion-default">: 仅在高相关度下启用技能上下文，降低无关技能误触发</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081998a74f5c427165cf1"><li><span class="notion-default"><b>自动沉淀技能</b></span><span class="notion-default">: 对高复用的已完成任务，自动生成可复用技能元数据，便于后续任务快速命中</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081fda89dfd2e7bbf1770"><li><span class="notion-default"><b>OpenCode 本地技能</b></span><span class="notion-default">: 自动读取 </span><span class="notion-default"><code class="notion-inline-code">~/.agents/skills</code></span><span class="notion-default">，可在技能页卸载</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081a280affc97843e4bb1"><li><span class="notion-default"><b>自定义目录技能</b></span><span class="notion-default">: 支持配置多个外部文件夹路径，自动扫描其中包含 </span><span class="notion-default"><code class="notion-inline-code">SKILL.md</code></span><span class="notion-default"> 的子目录并加载为只读技能</span></li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3449b82ce22081adb16cc7ff56991074" data-id="3449b82ce22081adb16cc7ff56991074"><span><div id="3449b82ce22081adb16cc7ff56991074" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce22081adb16cc7ff56991074" title="3.5 MCP 服务器管理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">3.5 MCP 服务器管理</span></span></span></h4><ul class="notion-list notion-list-disc notion-block-3449b82ce2208131a8bfc5cf8b0fc334"><li><span class="notion-default">支持 </span><span class="notion-default"><b>stdio</b></span><span class="notion-default"> 和 </span><span class="notion-default"><b>SSE</b></span><span class="notion-default"> 两种传输模式的 MCP 服务器配置</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce2208119bfb3ecd3d6fc209b"><li><span class="notion-default">SSE 模式的 MCP 工具由 </span><span class="notion-default"><code class="notion-inline-code">tool_dispatcher.py</code></span><span class="notion-default"> 自动调用：当用户提示词匹配到工具描述时，后端自动发起工具调用并将结果注入上下文</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce2208140a40eff0f7635a2dd"><li><span class="notion-default">完整 CRUD 管理界面（</span><span class="notion-default"><code class="notion-inline-code">/mcp</code></span><span class="notion-default"> 页面）及 REST API（</span><span class="notion-default"><code class="notion-inline-code">/api/mcp</code></span><span class="notion-default">）</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081b9b156d79855afcfbc"><li><span class="notion-default">魔搭 ModelScope MCP 集成：Codebot 统一代理外部 MCP 服务器，OpenCode 只需要连接 </span><span class="notion-default"><code class="notion-inline-code">codebot</code></span><span class="notion-default"> 这一个第三方 MCP</span></li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3449b82ce2208180b30ec01e18acac89" data-id="3449b82ce2208180b30ec01e18acac89"><span><div id="3449b82ce2208180b30ec01e18acac89" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce2208180b30ec01e18acac89" title="3.6 沙箱执行环境"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">3.6 沙箱执行环境</span></span></span></h4><ul class="notion-list notion-list-disc notion-block-3449b82ce220813d8d87f21cd7acf19e"><li><span class="notion-default">工作目录隔离执行环境，AI 生成的代码在独立 </span><span class="notion-default"><code class="notion-inline-code">data/sandbox_workspace/</code></span><span class="notion-default"> 目录中运行</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce2208169bd2ffbd5ed774a36"><li><span class="notion-default"><b>无需安装额外软件</b></span><span class="notion-default">：移除 QEMU/Docker 依赖，开箱即用</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce2208149b2d4e8c1ad8544e1"><li><span class="notion-default">基于 </span><span class="notion-default"><code class="notion-inline-code">asyncio.create_subprocess_shell</code></span><span class="notion-default"> 执行命令，支持超时控制</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce2208179bf26c079ab7cd621"><li><span class="notion-default">完整输出捕获：</span><span class="notion-default"><code class="notion-inline-code">stdout</code></span><span class="notion-default">、</span><span class="notion-default"><code class="notion-inline-code">stderr</code></span><span class="notion-default">、</span><span class="notion-default"><code class="notion-inline-code">exit_code</code></span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081d5a6dad4dad5bbc6cc"><li><span class="notion-default">执行模式：</span><span class="notion-default"><code class="notion-inline-code">local</code></span><span class="notion-default">（工作目录隔离）</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce2208111a972eac5a728e731"><li><span class="notion-default">可配置执行超时（秒，默认 300）</span></li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3449b82ce22081b6a47dc81a6d7f5447" data-id="3449b82ce22081b6a47dc81a6d7f5447"><span><div id="3449b82ce22081b6a47dc81a6d7f5447" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce22081b6a47dc81a6d7f5447" title="3.7 通知系统"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">3.7 通知系统</span></span></span></h4><ul class="notion-list notion-list-disc notion-block-3449b82ce2208105b42add0afdcef402"><li><span class="notion-default"><b>应用内通知</b></span><span class="notion-default">: 默认启用，在右上角查看</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220817abc91e070fda3d072"><li><span class="notion-default"><b>系统桌面通知</b></span><span class="notion-default">: 推送至操作系统通知中心（Windows/macOS/Linux）</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081a1a027f413dba4b885"><li><span class="notion-default"><b>飞书通知</b></span><span class="notion-default">: 配置 Webhook URL，支持长连接订阅模式（无需公网 IP）</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220816bb946c945e0f115d0"><li><span class="notion-default"><b>邮箱通知</b></span><span class="notion-default">: 配置 SMTP 服务器，支持一键发送测试邮件验证配置</span></li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3449b82ce22081659bbbc3214f0f1a29" data-id="3449b82ce22081659bbbc3214f0f1a29"><span><div id="3449b82ce22081659bbbc3214f0f1a29" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce22081659bbbc3214f0f1a29" title="4.1 目录结构自动管理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">4.1 目录结构自动管理</span></span></span></h4><div class="notion-text notion-block-3449b82ce22081a2bafedab2698c7e8f"><span class="notion-default">通过 Path/OS/shutil，确保数据、技能、日志、前端静态文件等关键目录存在，并按需种子复制内置技能（支持 PyInstaller 打包、Electron extraResources、本地源码多种场景）。</span></div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3449b82ce220811aa072f2199d548d7d" data-id="3449b82ce220811aa072f2199d548d7d"><span><div id="3449b82ce220811aa072f2199d548d7d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce220811aa072f2199d548d7d" title="4.2 沙箱隔离环境（sandbox_manager）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">4.2 沙箱隔离环境（sandbox_manager）</span></span></span></h4><div class="notion-text notion-block-3449b82ce220812d8b5cc7d0ab3dc1c5"><span class="notion-default">所有 AI 生成代码执行均在独立的 sandbox_workspace 下完成，采用 asyncio 子进程调度，并内置超时控制。</span></div><ul class="notion-list notion-list-disc notion-block-3449b82ce2208192911dd5ca617f414d"><li><span class="notion-default">隔离执行：防止异常/恶意代码危害主系统</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081aa9510cc00d5224901"><li><span class="notion-default">支持 stdout/stderr/exit_code 管理与实时反馈</span></li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3449b82ce22081b09f1ce5bd05f6a1b6" data-id="3449b82ce22081b09f1ce5bd05f6a1b6"><span><div id="3449b82ce22081b09f1ce5bd05f6a1b6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce22081b09f1ce5bd05f6a1b6" title="4.3 Memory 及知识库管理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">4.3 Memory 及知识库管理</span></span></span></h4><div class="notion-text notion-block-3449b82ce220817384b7de602151b941"><span class="notion-default">集成 SQLite + ChromaDB，支持上下文及长期记忆的持久化、自动提取、归档查看、导入导出、清理整理等多种管理手段。</span></div><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3449b82ce220811a94e8d0a0259d5818" data-id="3449b82ce220811a94e8d0a0259d5818"><span><div id="3449b82ce220811a94e8d0a0259d5818" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce220811a94e8d0a0259d5818" title="4.4 技能与 MCP 工具自动发现与调度"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">4.4 技能与 MCP 工具自动发现与调度</span></span></span></h4><div class="notion-text notion-block-3449b82ce220811eaa09c55a9671bd55"><span class="notion-default">遍历技能目录，按 YAML frontmatter 匹配技能元数据，实现低侵入调度与高可扩展性。</span></div><ul class="notion-list notion-list-disc notion-block-3449b82ce22081a580d8d44d9142f8c9"><li><span class="notion-default">ol生成技能沉淀</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081e5911cd2dafb77798f"><li><span class="notion-default">各技能支持内链调用</span></li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3449b82ce22081098414c5f307d0d253" data-id="3449b82ce22081098414c5f307d0d253"><span><div id="3449b82ce22081098414c5f307d0d253" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce22081098414c5f307d0d253" title="4.5 网络端口、多实例检测和优雅降级"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">4.5 网络端口、多实例检测和优雅降级</span></span></span></h4><div class="notion-text notion-block-3449b82ce220812eb900cf987f21f81c"><span class="notion-default">通过UDP/Socket检测局域网IP和端口占用，有效避免资源冲突和异常退出。Skill API 提供种子数据合并机制避免多实例请求异常。</span></div><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3449b82ce220812abd7ced7ffb621471" data-id="3449b82ce220812abd7ced7ffb621471"><span><div id="3449b82ce220812abd7ced7ffb621471" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce220812abd7ced7ffb621471" title="五、核心代码流程图（Mermaid）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">五、核心代码流程图（Mermaid）</span></span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3449b82ce22081198348c6ad265453e9" data-id="3449b82ce22081198348c6ad265453e9"><span><div id="3449b82ce22081198348c6ad265453e9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce22081198348c6ad265453e9" title="六、主要依赖与技术栈"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">六、主要依赖与技术栈</span></span></span></h3><ul class="notion-list notion-list-disc notion-block-3449b82ce22081afb2a1dce4c1cad11c"><li><span class="notion-default">Python 3.11+，FastAPI，asyncio，SQLite，ChromaDB，loguru</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220812baa0cccdfc466649c"><li><span class="notion-default">Electron, Node.js (前端打包/桌面)，Vue 3, Pinia</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081f28869cf9bb5f92e9c"><li><span class="notion-default">依赖自动检测（OpenCode CLI），跨平台兼容</span></li></ul><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-3449b82ce22081f39ddeef5c2e68ca90" data-id="3449b82ce22081f39ddeef5c2e68ca90"><span><div id="3449b82ce22081f39ddeef5c2e68ca90" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce22081f39ddeef5c2e68ca90" title="七、局限与改进建议"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">七、局限与改进建议</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3449b82ce22081dbb69edc0d1cf3ecb3" data-id="3449b82ce22081dbb69edc0d1cf3ecb3"><span><div id="3449b82ce22081dbb69edc0d1cf3ecb3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce22081dbb69edc0d1cf3ecb3" title="局限："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">局限：</span></span></span></h4><ul class="notion-list notion-list-disc notion-block-3449b82ce22081f69686ef5056c20714"><li><span class="notion-default">依赖 Electron+Python 环境，首次安装环境配置复杂</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220813fbb0dd36b6046a445"><li><span class="notion-default">需保证 OpenCode Server 正常运行方可使用绝大部分 AI 驱动功能</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220813983f2e95d55775193"><li><span class="notion-default">技能文件的自动沉淀仅依赖本地规则，用户自行管理自定义目录时须注意格式兼容</span></li></ul><h4 class="notion-h notion-h3 notion-h-indent-2 notion-block-3449b82ce2208110adebc6868098a2cf" data-id="3449b82ce2208110adebc6868098a2cf"><span><div id="3449b82ce2208110adebc6868098a2cf" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3449b82ce2208110adebc6868098a2cf" title="改进建议："><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">改进建议：</span></span></span></h4><ul class="notion-list notion-list-disc notion-block-3449b82ce22081c0b30be932ed1b56cf"><li><span class="notion-default">增强多模型 AI 后端兼容性（如深度集成 OpenAI API）</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081acbdd8c4b0d7ad5def"><li><span class="notion-default">前端适配移动端用户体验进一步优化</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce22081959be2cf8078bd1532"><li><span class="notion-default">技能市场与一键安装功能完善，降低维护门槛</span></li></ul><ul class="notion-list notion-list-disc notion-block-3449b82ce220819b9e59e1333dddd0f8"><li><span class="notion-default">增加云端备份及远程协作能力</span></li></ul></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[obsdian插件-yuhanbo-wechat_public，自媒体文章一键排版]]></title>
            <link>https://docs.sanrenjz.com/article/obsdian插件-yuhanbo-wechat_public，自媒体文章一键排版</link>
            <guid>https://docs.sanrenjz.com/article/obsdian插件-yuhanbo-wechat_public，自媒体文章一键排版</guid>
            <pubDate>Sat, 11 Apr 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[随着知识管理工具 Obsidian 的广泛应用，越来越多的用户希望将个人笔记内容分享到微信公众号等社交平台。然而，Markdown 格式与微信公众号编辑器之间存在显著的兼容性差异：微信公众号不支持原生]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-3409b82ce22081a4af28f8be944a0a1b"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-3409b82ce22081fe9913dcc5747f4c31"><span class="notion-default">随着知识管理工具 Obsidian 的广泛应用，越来越多的用户希望将个人笔记内容分享到微信公众号等社交平台。然而，Markdown 格式与微信公众号编辑器之间存在显著的兼容性差异：微信公众号不支持原生 Markdown 语法，且对 CSS 样式有特殊限制。Obsidian 微信公众号 Markdown 编辑器插件正是为解决这一问题而生，它实现了从 Obsidian Markdown 到微信公众号格式的无缝转换。</span></div><div class="notion-text notion-block-3409b82ce220818bbff7c86523461d0f"><span class="notion-default">本文将深入剖析该插件的代码架构、核心模块、技术实现细节，帮助开发者理解其设计思路和实现原理。</span></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3409b82ce220814ab135cd2ba347750e" data-id="3409b82ce220814ab135cd2ba347750e"><span><div id="3409b82ce220814ab135cd2ba347750e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce220814ab135cd2ba347750e" title="整体架构设计"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">整体架构设计</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3409b82ce22081e89c52dc08dfc95e27" data-id="3409b82ce22081e89c52dc08dfc95e27"><span><div id="3409b82ce22081e89c52dc08dfc95e27" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce22081e89c52dc08dfc95e27" title="核心类结构"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">核心类结构</span></span></span></h4><div class="notion-text notion-block-3409b82ce2208123b472cf6e895f8c9b"><span class="notion-default">插件采用经典的 MVC 架构模式，主要包含三个核心类：</span></div><ol start="1" class="notion-list notion-list-numbered notion-block-3409b82ce220811aa8b1d977a4906180" style="list-style-type:decimal"><li><span class="notion-default"><b>WeChatMarkdownPlugin</b></span><span class="notion-default">：主插件类，作为控制器负责插件生命周期管理、命令注册、视图协调</span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-3409b82ce22081eab27efdc86e0fc7fd" style="list-style-type:decimal"><li><span class="notion-default"><b>WeChatEditorView</b></span><span class="notion-default">：视图类，提供用户界面和交互逻辑</span></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-3409b82ce22081d3b3d9c5444341d7c1" style="list-style-type:decimal"><li><span class="notion-default"><b>WeChatSettingTab</b></span><span class="notion-default">：设置面板类，管理用户配置</span></li></ol><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3409b82ce2208199ac48f46a7962135d" data-id="3409b82ce2208199ac48f46a7962135d"><span><div id="3409b82ce2208199ac48f46a7962135d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce2208199ac48f46a7962135d" title="模块依赖关系"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">模块依赖关系</span></span></span></h4><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3409b82ce220813cb969f288fbb878f5" data-id="3409b82ce220813cb969f288fbb878f5"><span><div id="3409b82ce220813cb969f288fbb878f5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce220813cb969f288fbb878f5" title="主插件类：WeChatMarkdownPlugin"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">主插件类：WeChatMarkdownPlugin</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3409b82ce220815983c6c82e263862c2" data-id="3409b82ce220815983c6c82e263862c2"><span><div id="3409b82ce220815983c6c82e263862c2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce220815983c6c82e263862c2" title="初始化流程"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">初始化流程</span></span></span></h4><div class="notion-text notion-block-3409b82ce2208147b92fc5beebb44a15"><span class="notion-default"><code class="notion-inline-code">onload()</code></span><span class="notion-default"> 方法是插件的入口点，执行以下关键初始化操作：</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3409b82ce2208150beabfc62afbe89ff" data-id="3409b82ce2208150beabfc62afbe89ff"><span><div id="3409b82ce2208150beabfc62afbe89ff" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce2208150beabfc62afbe89ff" title="视图激活机制"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">视图激活机制</span></span></span></h4><div class="notion-text notion-block-3409b82ce22081648a67db156c49778f"><span class="notion-default"><code class="notion-inline-code">activateView()</code></span><span class="notion-default"> 方法实现了智能的视图管理：</span></div><div class="notion-text notion-block-3409b82ce22081928ae2cb10dcc19fff"><span class="notion-default">这种设计确保了单例模式，避免重复创建视图窗口。</span></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3409b82ce22081fb8b3df887a069e801" data-id="3409b82ce22081fb8b3df887a069e801"><span><div id="3409b82ce22081fb8b3df887a069e801" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce22081fb8b3df887a069e801" title="Markdown 解析与转换引擎"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">Markdown 解析与转换引擎</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3409b82ce22081428871ecd042488d96" data-id="3409b82ce22081428871ecd042488d96"><span><div id="3409b82ce22081428871ecd042488d96" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce22081428871ecd042488d96" title="Frontmatter 处理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">Frontmatter 处理</span></span></span></h4><div class="notion-text notion-block-3409b82ce220815b8263cb721f1f508d"><span class="notion-default">插件首先移除 Obsidian 特有的 YAML frontmatter（笔记属性）：</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3409b82ce2208169bcd3ee28c3fcafbd" data-id="3409b82ce2208169bcd3ee28c3fcafbd"><span><div id="3409b82ce2208169bcd3ee28c3fcafbd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce2208169bcd3ee28c3fcafbd" title="代码块处理策略"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">代码块处理策略</span></span></span></h4><div class="notion-text notion-block-3409b82ce2208180aeabef8db7a0501d"><span class="notion-default">代码块采用占位符替换策略，避免在后续处理中被意外修改：</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3409b82ce220818caa4ae541f9adaae8" data-id="3409b82ce220818caa4ae541f9adaae8"><span><div id="3409b82ce220818caa4ae541f9adaae8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce220818caa4ae541f9adaae8" title="标题渲染实现"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">标题渲染实现</span></span></span></h4><div class="notion-text notion-block-3409b82ce22081f8a5f5c920cc6d3f01"><span class="notion-default">标题采用从高到低的匹配顺序，确保正确捕获各级标题：</span></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3409b82ce220819f8c5fe5967baab469" data-id="3409b82ce220819f8c5fe5967baab469"><span><div id="3409b82ce220819f8c5fe5967baab469" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce220819f8c5fe5967baab469" title="嵌套列表解析系统"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">嵌套列表解析系统</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3409b82ce220811e9f0eeaac0833583b" data-id="3409b82ce220811e9f0eeaac0833583b"><span><div id="3409b82ce220811e9f0eeaac0833583b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce220811e9f0eeaac0833583b" title="核心挑战"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">核心挑战</span></span></span></h4><div class="notion-text notion-block-3409b82ce22081be8039c88008935d61"><span class="notion-default">Markdown 列表的嵌套层级处理是最复杂的部分，主要难点包括：</span></div><ul class="notion-list notion-list-disc notion-block-3409b82ce22081cf95f3e05796db7ac5"><li><span class="notion-default">Tab 和空格混合缩进的处理</span></li></ul><ul class="notion-list notion-list-disc notion-block-3409b82ce2208186957fc5f9d32f8629"><li><span class="notion-default">有序/无序列表的类型切换</span></li></ul><ul class="notion-list notion-list-disc notion-block-3409b82ce22081209733c9de885aafd4"><li><span class="notion-default">列表项续行（多行内容）的合并</span></li></ul><ul class="notion-list notion-list-disc notion-block-3409b82ce2208119813df9cce1ef0565"><li><span class="notion-default">序号层级的一致性维护</span></li></ul><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3409b82ce22081adb502cd7a39760777" data-id="3409b82ce22081adb502cd7a39760777"><span><div id="3409b82ce22081adb502cd7a39760777" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce22081adb502cd7a39760777" title="栈式解析算法"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">栈式解析算法</span></span></span></h4><div class="notion-text notion-block-3409b82ce2208104bb7bfd4cb95dcc78"><span class="notion-default">插件采用栈结构管理列表层级状态：</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3409b82ce220814bb0efcaf3110bd866" data-id="3409b82ce220814bb0efcaf3110bd866"><span><div id="3409b82ce220814bb0efcaf3110bd866" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce220814bb0efcaf3110bd866" title="序号标准化"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">序号标准化</span></span></span></h4><div class="notion-text notion-block-3409b82ce22081519116e5b6254f9899"><span class="notion-default"><code class="notion-inline-code">normalizeListItems()</code></span><span class="notion-default"> 方法确保有序列表序号的正确性：</span></div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-3409b82ce22081a3badae70b48b8b6b4"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://xz.sanrenjz.com/image/Obsidian%E8%87%AA%E5%AA%92%E4%BD%93MD%E7%BC%96%E8%BE%91%E5%99%A8%EF%BC%9A%E4%B8%80%E9%94%AE%E8%BD%AC%E6%8D%A2%E6%8E%92%E7%89%88%E6%A0%BC%E5%BC%8F-16x9.png?imageSlim=&amp;spaceId=0ffd71f6-046a-4fc3-b642-5699b7c5ef56&amp;t=3409b82c-e220-81a3-bada-e70b48b8b6b4" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3409b82ce220814da0f7f7f9ea1014d6" data-id="3409b82ce220814da0f7f7f9ea1014d6"><span><div id="3409b82ce220814da0f7f7f9ea1014d6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce220814da0f7f7f9ea1014d6" title="主题样式系统"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">主题样式系统</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3409b82ce220818383abcc0a064d894c" data-id="3409b82ce220818383abcc0a064d894c"><span><div id="3409b82ce220818383abcc0a064d894c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce220818383abcc0a064d894c" title="配置架构"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">配置架构</span></span></span></h4><div class="notion-text notion-block-3409b82ce220817797dac6b84cd5f422"><span class="notion-default">主题系统由三层配置组成：</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3409b82ce220812fa28fdcd79ea2bfae" data-id="3409b82ce220812fa28fdcd79ea2bfae"><span><div id="3409b82ce220812fa28fdcd79ea2bfae" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce220812fa28fdcd79ea2bfae" title="CSS 变量机制"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">CSS 变量机制</span></span></span></h4><div class="notion-text notion-block-3409b82ce22081eb97c7f8ca1c141992"><span class="notion-default">主题使用 CSS 变量实现动态样式切换：</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3409b82ce2208136bf0eccd5d2691e9b" data-id="3409b82ce2208136bf0eccd5d2691e9b"><span><div id="3409b82ce2208136bf0eccd5d2691e9b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce2208136bf0eccd5d2691e9b" title="CSS 内联处理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">CSS 内联处理</span></span></span></h4><div class="notion-text notion-block-3409b82ce220819697b4cf1b8f3fb521"><span class="notion-default">微信公众号不支持外部 CSS，需要将样式内联到 HTML 元素：</span></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3409b82ce22081e283aeed254af6a5c5" data-id="3409b82ce22081e283aeed254af6a5c5"><span><div id="3409b82ce22081e283aeed254af6a5c5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce22081e283aeed254af6a5c5" title="编辑器视图实现"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">编辑器视图实现</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3409b82ce220814cafbce4223d3d8eb0" data-id="3409b82ce220814cafbce4223d3d8eb0"><span><div id="3409b82ce220814cafbce4223d3d8eb0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce220814cafbce4223d3d8eb0" title="界面结构"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">界面结构</span></span></span></h4><div class="notion-text notion-block-3409b82ce22081d9a872ddf51291f240"><span class="notion-default">视图界面包含以下核心组件：</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3409b82ce22081748fa1ea862a24e2f8" data-id="3409b82ce22081748fa1ea862a24e2f8"><span><div id="3409b82ce22081748fa1ea862a24e2f8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce22081748fa1ea862a24e2f8" title="文件同步机制"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">文件同步机制</span></span></span></h4><div class="notion-text notion-block-3409b82ce220818f926ee123b02a2c73"><span class="notion-default">视图监听工作区事件实现自动同步：</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3409b82ce220810686e8f120e2bb757d" data-id="3409b82ce220810686e8f120e2bb757d"><span><div id="3409b82ce220810686e8f120e2bb757d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce220810686e8f120e2bb757d" title="复制功能实现"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">复制功能实现</span></span></span></h4><div class="notion-text notion-block-3409b82ce220813b923ff3e5df912706"><span class="notion-default">三种复制模式的核心差异：</span></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3409b82ce22081e69249eeb9e22eb0b0" data-id="3409b82ce22081e69249eeb9e22eb0b0"><span><div id="3409b82ce22081e69249eeb9e22eb0b0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce22081e69249eeb9e22eb0b0" title="设置面板设计"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">设置面板设计</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3409b82ce220812db9fae350f2f1852d" data-id="3409b82ce220812db9fae350f2f1852d"><span><div id="3409b82ce220812db9fae350f2f1852d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce220812db9fae350f2f1852d" title="配置项结构"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">配置项结构</span></span></span></h4><div class="notion-text notion-block-3409b82ce2208123a414faaab686d610"><span class="notion-default">设置面板提供完整的自定义选项：</span></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3409b82ce22081f3a93ff87c7cd0735b" data-id="3409b82ce22081f3a93ff87c7cd0735b"><span><div id="3409b82ce22081f3a93ff87c7cd0735b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce22081f3a93ff87c7cd0735b" title="技术依赖分析"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">技术依赖分析</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3409b82ce22081bf8ea4c4c9108d7c00" data-id="3409b82ce22081bf8ea4c4c9108d7c00"><span><div id="3409b82ce22081bf8ea4c4c9108d7c00" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce22081bf8ea4c4c9108d7c00" title="核心依赖库"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">核心依赖库</span></span></span></h4><table class="notion-simple-table notion-block-3409b82ce220814bb5a8ee84a303b46a"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-3409b82ce220813b999bead07080b8f0"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">依赖</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">版本</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">用途</span></div></td></tr><tr class="notion-simple-table-row notion-block-3409b82ce22081ba8e8bda635b38ac5d"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">obsidian</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">latest</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">Obsidian 插件 API</span></div></td></tr><tr class="notion-simple-table-row notion-block-3409b82ce2208137a63ff494b128b148"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">juice</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">^11.1.1</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">CSS 内联化处理</span></div></td></tr><tr class="notion-simple-table-row notion-block-3409b82ce22081d8b136eb69daa35f90"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">marked</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">^4.3.0</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">Markdown 解析（备用）</span></div></td></tr><tr class="notion-simple-table-row notion-block-3409b82ce22081faabebf9a9dc38d9c7"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">mermaid</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">^10.9.1</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">流程图渲染</span></div></td></tr><tr class="notion-simple-table-row notion-block-3409b82ce22081ac83dcf39bf0aa4e07"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">highlight.js</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">^11.8.0</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">代码语法高亮</span></div></td></tr></tbody></table><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3409b82ce2208185b161e9ca82d0fda4" data-id="3409b82ce2208185b161e9ca82d0fda4"><span><div id="3409b82ce2208185b161e9ca82d0fda4" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce2208185b161e9ca82d0fda4" title="构建工具"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">构建工具</span></span></span></h4><div class="notion-text notion-block-3409b82ce220815f8371cda499e50dcf"><span class="notion-default">使用 ESBuild 进行高效打包：</span></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3409b82ce220814e8ab3dd80e82b6c82" data-id="3409b82ce220814e8ab3dd80e82b6c82"><span><div id="3409b82ce220814e8ab3dd80e82b6c82" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce220814e8ab3dd80e82b6c82" title="潜在限制与改进建议"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">潜在限制与改进建议</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3409b82ce2208110b5a1f3ecef262e61" data-id="3409b82ce2208110b5a1f3ecef262e61"><span><div id="3409b82ce2208110b5a1f3ecef262e61" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce2208110b5a1f3ecef262e61" title="当前限制"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">当前限制</span></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-3409b82ce2208121a254f7eff44602ea" style="list-style-type:decimal"><li><span class="notion-default"><b>图片处理局限</b></span><span class="notion-default">：相对路径图片处理依赖文件系统 API，网络图片无法自动优化</span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-3409b82ce22081a98878e8994a8edeca" style="list-style-type:decimal"><li><span class="notion-default"><b>Mermaid 渲染</b></span><span class="notion-default">：流程图依赖客户端渲染，某些微信公众号环境可能不支持</span></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-3409b82ce2208115b431c6c2290ab4fb" style="list-style-type:decimal"><li><span class="notion-default"><b>表格样式</b></span><span class="notion-default">：微信编辑器对表格样式支持有限，复杂表格可能显示异常</span></li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-3409b82ce22081e78e64daa094aa9bd5" style="list-style-type:decimal"><li><span class="notion-default"><b>性能考虑</b></span><span class="notion-default">：大文档转换可能存在延迟，未实现增量渲染</span></li></ol><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-3409b82ce22081f58308e9bfb41ae590" data-id="3409b82ce22081f58308e9bfb41ae590"><span><div id="3409b82ce22081f58308e9bfb41ae590" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce22081f58308e9bfb41ae590" title="改进建议"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">改进建议</span></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-3409b82ce2208175a1c1d31f6ece8721" style="list-style-type:decimal"><li><span class="notion-default"><b>引入图片上传服务</b></span><span class="notion-default">：集成图床 API，自动上传本地图片获取 CDN 链接</span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-3409b82ce220818ca0e7d5c33da0b72a" style="list-style-type:decimal"><li><span class="notion-default"><b>缓存机制</b></span><span class="notion-default">：缓存已转换的内容，避免重复处理</span></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-3409b82ce22081c08104f01a9ed3f7db" style="list-style-type:decimal"><li><span class="notion-default"><b>模板系统</b></span><span class="notion-default">：支持用户自定义主题模板，扩展个性化选项</span></li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-3409b82ce22081e7a989fab4bf77539e" style="list-style-type:decimal"><li><span class="notion-default"><b>AI 辅助</b></span><span class="notion-default">：集成 AI 接口，提供内容优化、格式建议等功能</span></li></ol><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3409b82ce2208117813ed7bf71a6395c" data-id="3409b82ce2208117813ed7bf71a6395c"><span><div id="3409b82ce2208117813ed7bf71a6395c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3409b82ce2208117813ed7bf71a6395c" title="总结"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">总结</span></span></span></h3><div class="notion-text notion-block-3409b82ce220810e91ebcb8412809c23"><span class="notion-default">Obsidian 微信公众号 Markdown 编辑器插件通过精巧的架构设计，实现了 Markdown 到微信公众号格式的无缝转换。其核心亮点包括：</span></div><ul class="notion-list notion-list-disc notion-block-3409b82ce2208144bef4c3b27611ed38"><li><span class="notion-default"><b>栈式列表解析算法</b></span><span class="notion-default">：精准处理复杂的嵌套列表结构</span></li></ul><ul class="notion-list notion-list-disc notion-block-3409b82ce22081619553e8f629a0c259"><li><span class="notion-default"><b>主题样式系统</b></span><span class="notion-default">：CSS 变量驱动的多主题动态切换</span></li></ul><ul class="notion-list notion-list-disc notion-block-3409b82ce22081719d5fc9deb970f2e0"><li><span class="notion-default"><b>CSS 内联处理</b></span><span class="notion-default">：使用 juice 库解决微信样式限制</span></li></ul><ul class="notion-list notion-list-disc notion-block-3409b82ce220813cb2d5ea7f6afe3433"><li><span class="notion-default"><b>模块化设计</b></span><span class="notion-default">：清晰的 MVC 分层，便于维护和扩展</span></li></ul><div class="notion-text notion-block-3409b82ce22081e69523c02d5e258fb7"><span class="notion-default">该插件为 Obsidian 用户提供了高效的微信公众号内容创作工具，将知识管理与内容发布无缝衔接，显著提升了创作者的工作效率。</span></div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OBS口播录播直播利器：智能画面缩放插件的设计与实现]]></title>
            <link>https://docs.sanrenjz.com/article/OBS口播录播直播利器：智能画面缩放插件的设计与实现</link>
            <guid>https://docs.sanrenjz.com/article/OBS口播录播直播利器：智能画面缩放插件的设计与实现</guid>
            <pubDate>Sat, 01 Mar 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[本文将深入解析一个为OBS Studio开发的智能画面缩放插件。这个插件通过Python语言实现，能够根据鼠标位置自动调整画面缩放效果，为直播观众带来更好的观看体验。]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-33c9b82ce220819092ddcc00ea449238"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-33c9b82ce220815a97b3edb3e63bc564"><span class="notion-default">本文将深入解析一个为OBS Studio开发的智能画面缩放插件。这个插件通过Python语言实现，能够根据鼠标位置自动调整画面缩放效果，为直播观众带来更好的观看体验。</span></div><div class="notion-text notion-block-33c9b82ce2208194910ef804cbd76068"><span class="notion-default">注意：OBS 的插件是基于 python 运行的，若你不熟悉或不会安装相应的库，请不要拍，不提供技术支持。</span></div><div class="notion-text notion-block-33c9b82ce22081e99611cb86e9072204"><span class="notion-default">github 开源：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/yuhanbo758/obs_display_frame">yuhanbo758/obs_display_frame: OBS Python script for intelligent display zoom based on mouse position.</a></span></div><div class="notion-text notion-block-33c9b82ce22081f8a816d1e8d1ba9702"><span class="notion-default">gitee 开源：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/yuhanbo758/obs_display_frame">yuhanbo758/obs_display_frame: OBS Python script for intelligent display zoom based on mouse position.</a></span></div><div class="notion-text notion-block-33c9b82ce220815ebcc0d0c040d879bc"><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://jy.sanrenjz.com/buy/6">OBS录播直播画面智能缩放大师脚本 | 三人聚智-余汉波程序小店</a></span></div><div class="notion-text notion-block-33c9b82ce22081a8a7cbce194b5ec71c"><span class="notion-default">视频：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.bilibili.com/video/BV18yXXYMEFm/?vd_source=247ac77d4ae7339ea06d0fec09aa8f70">OBS口播录播直播利器：智能画面缩放插件_哔哩哔哩_bilibili</a></span></div><h4 class="notion-h notion-h3 notion-h-indent-0 notion-block-33c9b82ce22081009d88ddc25893f243" data-id="33c9b82ce22081009d88ddc25893f243"><span><div id="33c9b82ce22081009d88ddc25893f243" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce22081009d88ddc25893f243" title="使用的技术栈"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">使用的技术栈</span></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-33c9b82ce2208102a36deb47016ad3c4" style="list-style-type:decimal"><li><span class="notion-default">核心技术：</span></li><ol class="notion-list notion-list-numbered notion-block-33c9b82ce2208102a36deb47016ad3c4" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081b6bc54f8b468189923"><li><span class="notion-default">Python 3.6+</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce2208103b6c4cc014603bc5f"><li><span class="notion-default">OBS Studio Python API (obspython)</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081139803ed8f767da478"><li><span class="notion-default">PyAutoGUI库</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081c2a7a5c21cd2b6e114"><li><span class="notion-default">多线程编程</span></li></ul></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-33c9b82ce2208119ab09e2133b4d26b1" style="list-style-type:decimal"><li><span class="notion-default">主要依赖：可以打开 cmd 使用 pip 进行安装，比如 </span><span class="notion-default"><code class="notion-inline-code">pip obspython</code></span></li><ol class="notion-list notion-list-numbered notion-block-33c9b82ce2208119ab09e2133b4d26b1" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081e492fef785263e1aa7"><li><span class="notion-default">obspython：OBS Studio的Python接口</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081a7a4bbcc4f3e431116"><li><span class="notion-default">pyautogui：用于获取鼠标位置</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081cb916bc231d767bf54"><li><span class="notion-default">threading：实现后台监控</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081cf8d45f614fc3da73c"><li><span class="notion-default">time：处理时间相关操作</span></li></ul></ol></ol><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-33c9b82ce2208170af4ed887bd5db556"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://gdsx.sanrenjz.com/image/OIG3.jpg?imageSlim=&amp;spaceId=0ffd71f6-046a-4fc3-b642-5699b7c5ef56&amp;t=33c9b82c-e220-8170-af4e-d887bd5db556" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-33c9b82ce22081269363c3812e7bbfec" data-id="33c9b82ce22081269363c3812e7bbfec"><span><div id="33c9b82ce22081269363c3812e7bbfec" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce22081269363c3812e7bbfec" title="Python环境安装教程"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">Python环境安装教程</span></span></span></h3><div class="notion-text notion-block-33c9b82ce22081248d14e3e216222c6f"><span class="notion-default">由于本插件基于Python运行，在开始使用前需要正确安装和配置Python环境。以下是详细的安装步骤：</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33c9b82ce22081fcae30c541155c1c34" data-id="33c9b82ce22081fcae30c541155c1c34"><span><div id="33c9b82ce22081fcae30c541155c1c34" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce22081fcae30c541155c1c34" title="Windows系统安装Python"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">Windows系统安装Python</span></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33c9b82ce22081a68b56f6a499b0ffb2" data-id="33c9b82ce22081a68b56f6a499b0ffb2"><span><div id="33c9b82ce22081a68b56f6a499b0ffb2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce22081a68b56f6a499b0ffb2" title="方法一：官网安装（推荐）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">方法一：官网安装（推荐）</span></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-33c9b82ce22081c69d4fffe11a11e43f" style="list-style-type:decimal"><li><span class="notion-default"><b>下载Python安装包</b></span></li><ol class="notion-list notion-list-numbered notion-block-33c9b82ce22081c69d4fffe11a11e43f" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081faa600c34f61c787c3"><li><span class="notion-default">访问Python官网：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.python.org/downloads/">https://www.python.org/downloads/</a></span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce220819b87bfc781b1077535"><li><span class="notion-default">选择Python 3.6或更高版本（推荐3.8或3.9）</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce220815ebaeaec6603ed4d29"><li><span class="notion-default">下载Windows installer (64-bit)</span></li></ul></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-33c9b82ce22081629807ded88cf5153b" style="list-style-type:decimal"><li><span class="notion-default"><b>安装Python</b></span></li><ol class="notion-list notion-list-numbered notion-block-33c9b82ce22081629807ded88cf5153b" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-33c9b82ce220818caeb2f3114229b76a"><li><span class="notion-default">双击下载的安装包</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce220810ab3b0fadddb47125a"><li><span class="notion-default"><b>重要</b></span><span class="notion-default">：勾选&quot;Add Python to PATH&quot;选项</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce220817c94c4d535a7622108"><li><span class="notion-default">选择&quot;Install Now&quot;或自定义安装路径</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081e1a276dd59f6b9805d"><li><span class="notion-default">等待安装完成</span></li></ul></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-33c9b82ce22081ea862aeb69b13cd948" style="list-style-type:decimal"><li><span class="notion-default"><b>验证安装</b></span></li><ol class="notion-list notion-list-numbered notion-block-33c9b82ce22081ea862aeb69b13cd948" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-33c9b82ce220818ab314dba6f38765ca"><li><span class="notion-default">打开命令提示符（Win+R，输入cmd，回车）</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce2208144b5b1efe4d571fea5"><li><span class="notion-default">输入命令：</span><span class="notion-default"><code class="notion-inline-code">python --version</code></span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce220815aa6bdc3ca2fea6c6b"><li><span class="notion-default">应显示Python版本号，如：</span><span class="notion-default"><code class="notion-inline-code">Python 3.9.13</code></span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce220817e94acf0f054e02c16"><li><span class="notion-default">输入命令：</span><span class="notion-default"><code class="notion-inline-code">pip --version</code></span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce220810e8ae6f39d72a91052"><li><span class="notion-default">应显示pip版本信息</span></li></ul></ol></ol><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33c9b82ce22081d48549f2f651eaae7d" data-id="33c9b82ce22081d48549f2f651eaae7d"><span><div id="33c9b82ce22081d48549f2f651eaae7d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce22081d48549f2f651eaae7d" title="方法二：通过Microsoft Store安装"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">方法二：通过Microsoft Store安装</span></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-33c9b82ce22081de92dffed6aaef9e97" style="list-style-type:decimal"><li><span class="notion-default">打开Microsoft Store</span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-33c9b82ce220814aba8ec93111f3bc97" style="list-style-type:decimal"><li><span class="notion-default">搜索&quot;Python&quot;</span></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-33c9b82ce220814b9bf0c2dff81967a6" style="list-style-type:decimal"><li><span class="notion-default">选择Python 3.9或3.10</span></li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-33c9b82ce2208159a70fca1a3ac27473" style="list-style-type:decimal"><li><span class="notion-default">点击&quot;获取&quot;按钮进行安装</span></li></ol><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33c9b82ce220813eadacf29f6dc95dfa" data-id="33c9b82ce220813eadacf29f6dc95dfa"><span><div id="33c9b82ce220813eadacf29f6dc95dfa" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce220813eadacf29f6dc95dfa" title="OBS Studio Python环境配置"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">OBS Studio Python环境配置</span></span></span></h4><div class="notion-text notion-block-33c9b82ce22081598505cd8399fe990f"><span class="notion-default">OBS Studio需要配置Python路径才能运行脚本：</span></div><ol start="1" class="notion-list notion-list-numbered notion-block-33c9b82ce22081cd8409f6f4ad2b32cf" style="list-style-type:decimal"><li><span class="notion-default"><b>打开OBS Studio</b></span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-33c9b82ce2208143a571c97b6b8eecab" style="list-style-type:decimal"><li><span class="notion-default"><b>进入Python脚本设置</b></span></li><ol class="notion-list notion-list-numbered notion-block-33c9b82ce2208143a571c97b6b8eecab" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081ceb444e46426c3138c"><li><span class="notion-default">菜单栏：工具 → 脚本</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce2208181b71dc9c8fb501c67"><li><span class="notion-default">或使用快捷键设置（如果有配置）</span></li></ul></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-33c9b82ce2208179a362f836b719fe4e" style="list-style-type:decimal"><li><span class="notion-default"><b>配置Python路径</b></span></li><ol class="notion-list notion-list-numbered notion-block-33c9b82ce2208179a362f836b719fe4e" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-33c9b82ce220817abcc0f42b19708bc5"><li><span class="notion-default">在脚本窗口中，点击&quot;Python设置&quot;标签</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081d9a7f3d50b58012f48"><li><span class="notion-default">Python安装路径示例：</span></li><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081d9a7f3d50b58012f48"><li><span class="notion-default">默认安装：</span><span class="notion-default"><code class="notion-inline-code">C:\Users\你的用户名\AppData\Local\Programs\Python\Python39</code></span></li><li><span class="notion-default">或：</span><span class="notion-default"><code class="notion-inline-code">C:\Python39</code></span></li></ul></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081c7a8edcbdec7792f71"><li><span class="notion-default">点击&quot;浏览&quot;选择Python安装目录</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081d0bce1f365e336cc87"><li><span class="notion-default">确保路径指向包含</span><span class="notion-default"><code class="notion-inline-code">python.exe</code></span><span class="notion-default">的文件夹</span></li></ul></ol></ol><ol start="4" class="notion-list notion-list-numbered notion-block-33c9b82ce22081729003fb3b19335282" style="list-style-type:decimal"><li><span class="notion-default"><b>验证配置</b></span></li><ol class="notion-list notion-list-numbered notion-block-33c9b82ce22081729003fb3b19335282" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081bebc83ebc6809b58a2"><li><span class="notion-default">在脚本窗口的&quot;脚本&quot;标签页</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce2208138a648c5cb99854930"><li><span class="notion-default">点击&quot;+&quot;号加载示例脚本</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081b192bbd0721ab69777"><li><span class="notion-default">如果没有报错，说明配置成功</span></li></ul></ol></ol><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33c9b82ce22081e49c24d9853b9a18d9" data-id="33c9b82ce22081e49c24d9853b9a18d9"><span><div id="33c9b82ce22081e49c24d9853b9a18d9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce22081e49c24d9853b9a18d9" title="安装依赖库"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">安装依赖库</span></span></span></h4><div class="notion-text notion-block-33c9b82ce22081938f83dadb9da038a8"><span class="notion-default">配置好Python环境后，需要安装插件所需的依赖库：</span></div><ol start="1" class="notion-list notion-list-numbered notion-block-33c9b82ce220810ea2b6f04c56e3c810" style="list-style-type:decimal"><li><span class="notion-default"><b>打开命令提示符</b></span></li><ol class="notion-list notion-list-numbered notion-block-33c9b82ce220810ea2b6f04c56e3c810" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-33c9b82ce2208136991cd6708c8a6462"><li><span class="notion-default">Win+R，输入</span><span class="notion-default"><code class="notion-inline-code">cmd</code></span><span class="notion-default">，回车</span></li></ul></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-33c9b82ce22081ba8ca4ee511d13e733" style="list-style-type:decimal"><li><span class="notion-default"><b>安装pyautogui库</b></span></li><ol class="notion-list notion-list-numbered notion-block-33c9b82ce22081ba8ca4ee511d13e733" style="list-style-type:lower-alpha"></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-33c9b82ce22081c6b650d19e686205ff" style="list-style-type:decimal"><li><span class="notion-default"><b>验证安装</b></span></li><ol class="notion-list notion-list-numbered notion-block-33c9b82ce22081c6b650d19e686205ff" style="list-style-type:lower-alpha"></ol></ol><ol start="4" class="notion-list notion-list-numbered notion-block-33c9b82ce22081e2897ce49cb9953178" style="list-style-type:decimal"><li><span class="notion-default"><b>常见安装问题</b></span></li><ol class="notion-list notion-list-numbered notion-block-33c9b82ce22081e2897ce49cb9953178" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081768c04d45b1875dfac"><li><span class="notion-default">如果pip命令不可用，尝试：</span><span class="notion-default"><code class="notion-inline-code">python -m pip install pyautogui</code></span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081059711f04cdb1d2d6e"><li><span class="notion-default">如果权限不足，使用管理员权限运行cmd</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081fe8e73d1ab64e651b0"><li><span class="notion-default">如果网络问题，使用国内镜像源：</span></li><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081fe8e73d1ab64e651b0"></ul></ul></ol></ol><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33c9b82ce22081be980ac870ef542ed7" data-id="33c9b82ce22081be980ac870ef542ed7"><span><div id="33c9b82ce22081be980ac870ef542ed7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce22081be980ac870ef542ed7" title="注意事项"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">注意事项</span></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-33c9b82ce2208167a457e565c50d337f" style="list-style-type:decimal"><li><span class="notion-default"><b>版本兼容性</b></span></li><ol class="notion-list notion-list-numbered notion-block-33c9b82ce2208167a457e565c50d337f" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081cb9abeea6dcd51d0da"><li><span class="notion-default">OBS Studio 27.0及以上版本支持Python 3.8+</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081848502c7728a03ee17"><li><span class="notion-default">旧版OBS可能需要Python 3.6</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081fc80eefbf4f0e6c93c"><li><span class="notion-default">建议使用Python 3.8或3.9版本，兼容性最佳</span></li></ul></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-33c9b82ce220819f9cf1ddee87e2688d" style="list-style-type:decimal"><li><span class="notion-default"><b>路径问题</b></span></li><ol class="notion-list notion-list-numbered notion-block-33c9b82ce220819f9cf1ddee87e2688d" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081b2b6caebf36b13aa56"><li><span class="notion-default">避免在Python安装路径中使用中文或空格</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce220819bb710c56b553d66a6"><li><span class="notion-default">推荐安装路径：</span><span class="notion-default"><code class="notion-inline-code">C:\Python39</code></span><span class="notion-default">或</span><span class="notion-default"><code class="notion-inline-code">D:\Python39</code></span></li></ul></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-33c9b82ce22081688d17c7a2d5636f40" style="list-style-type:decimal"><li><span class="notion-default"><b>多Python版本管理</b></span></li><ol class="notion-list notion-list-numbered notion-block-33c9b82ce22081688d17c7a2d5636f40" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-33c9b82ce2208119a836f923675005e9"><li><span class="notion-default">如果系统安装了多个Python版本，使用py启动器：</span></li><ul class="notion-list notion-list-disc notion-block-33c9b82ce2208119a836f923675005e9"></ul></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081dabaaef3156692c069"><li><span class="notion-default">或使用虚拟环境管理工具（如conda）</span></li></ul></ol></ol><ol start="4" class="notion-list notion-list-numbered notion-block-33c9b82ce22081c1a468d2c1953ed8e8" style="list-style-type:decimal"><li><span class="notion-default"><b>重启OBS</b></span></li><ol class="notion-list notion-list-numbered notion-block-33c9b82ce22081c1a468d2c1953ed8e8" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-33c9b82ce2208197bd14c56c1a3f8da1"><li><span class="notion-default">安装完依赖库后，重启OBS Studio确保生效</span></li></ul></ol></ol><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33c9b82ce220818a9931f0eaf2ad9c00" data-id="33c9b82ce220818a9931f0eaf2ad9c00"><span><div id="33c9b82ce220818a9931f0eaf2ad9c00" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce220818a9931f0eaf2ad9c00" title="环境检查清单"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">环境检查清单</span></span></span></h4><div class="notion-text notion-block-33c9b82ce2208197b10bf95e4fed3478"><span class="notion-default">在运行插件前，请确认以下事项：</span></div><div class="notion-to-do notion-block-33c9b82ce220816bb62eff625a0836a0"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body"><span class="notion-default">Python已正确安装（</span><span class="notion-default"><code class="notion-inline-code">python --version</code></span><span class="notion-default">有输出）</span></div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-33c9b82ce2208161ad00e5b80c7a7af2"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body"><span class="notion-default">pip可用（</span><span class="notion-default"><code class="notion-inline-code">pip --version</code></span><span class="notion-default">有输出）</span></div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-33c9b82ce22081caacecec2e5d41af81"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body"><span class="notion-default">pyautogui库已安装</span></div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-33c9b82ce22081858769d626a055bc13"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body"><span class="notion-default">OBS中Python路径已配置</span></div></div><div class="notion-to-do-children"></div></div><div class="notion-to-do notion-block-33c9b82ce22081279cc0ebbcf586491d"><div class="notion-to-do-item"><span class="notion-property notion-property-checkbox"><div class="notion-property-checkbox-unchecked"></div></span><div class="notion-to-do-body"><span class="notion-default">OBS已重启</span></div></div><div class="notion-to-do-children"></div></div><div class="notion-text notion-block-33c9b82ce22081c0b76ed879da1d33ee"><span class="notion-default">完成以上步骤后，即可在OBS中加载和使用智能画面缩放插件。</span></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-33c9b82ce22081aeb3c9da5bf3c6ac16" data-id="33c9b82ce22081aeb3c9da5bf3c6ac16"><span><div id="33c9b82ce22081aeb3c9da5bf3c6ac16" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce22081aeb3c9da5bf3c6ac16" title="代码结构与实现原理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">代码结构与实现原理</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33c9b82ce2208151ba42f2561e9163e2" data-id="33c9b82ce2208151ba42f2561e9163e2"><span><div id="33c9b82ce2208151ba42f2561e9163e2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce2208151ba42f2561e9163e2" title="核心参数设计"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">核心参数设计</span></span></span></h4><div class="notion-text notion-block-33c9b82ce22081499690c690db36eb76"><span class="notion-default">这些参数构成了插件的核心配置，可通过OBS界面动态调整，实现灵活的自定义配置。</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33c9b82ce2208190b7d4c2e7edf718e0" data-id="33c9b82ce2208190b7d4c2e7edf718e0"><span><div id="33c9b82ce2208190b7d4c2e7edf718e0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce2208190b7d4c2e7edf718e0" title="工作流程图"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">工作流程图</span></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33c9b82ce220813498dacc8592a483bd" data-id="33c9b82ce220813498dacc8592a483bd"><span><div id="33c9b82ce220813498dacc8592a483bd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce220813498dacc8592a483bd" title="核心功能实现"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">核心功能实现</span></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33c9b82ce22081dfa7c9eec5eef8affc" data-id="33c9b82ce22081dfa7c9eec5eef8affc"><span><div id="33c9b82ce22081dfa7c9eec5eef8affc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce22081dfa7c9eec5eef8affc" title="1. 初始化与配置管理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">1. 初始化与配置管理</span></span></span></h4><div class="notion-text notion-block-33c9b82ce22081ce9e58d0d7cf343508"><span class="notion-default">插件通过</span><span class="notion-default"><code class="notion-inline-code">script_description()</code></span><span class="notion-default">和</span><span class="notion-default"><code class="notion-inline-code">script_properties()</code></span><span class="notion-default">函数实现配置界面的创建：</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33c9b82ce22081a6a6dee98177fdf889" data-id="33c9b82ce22081a6a6dee98177fdf889"><span><div id="33c9b82ce22081a6a6dee98177fdf889" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce22081a6a6dee98177fdf889" title="2. 鼠标位置监控系统"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">2. 鼠标位置监控系统</span></span></span></h4><div class="notion-text notion-block-33c9b82ce2208137b701c023396b56b5"><span class="notion-default">插件使用独立线程持续监控鼠标位置，避免影响OBS主程序性能：</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33c9b82ce2208195b08dd9ff3fe8a989" data-id="33c9b82ce2208195b08dd9ff3fe8a989"><span><div id="33c9b82ce2208195b08dd9ff3fe8a989" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce2208195b08dd9ff3fe8a989" title="3. 智能缩放算法"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">3. 智能缩放算法</span></span></span></h4><div class="notion-text notion-block-33c9b82ce22081df9934ff96fa0040ba"><span class="notion-default">缩放算法包含以下关键要素：</span></div><ul class="notion-list notion-list-disc notion-block-33c9b82ce2208193963ee28d4022e9ba"><li><span class="notion-default">鼠标停留检测</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce220818982f3c5b2d409fe5e"><li><span class="notion-default">平滑过渡处理</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce220817dabedca240a96ef8a"><li><span class="notion-default">边界检查</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce220810e8a01c505cfc0c2a5"><li><span class="notion-default">防抖动处理</span></li></ul><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33c9b82ce220811e8178f4befe88380a" data-id="33c9b82ce220811e8178f4befe88380a"><span><div id="33c9b82ce220811e8178f4befe88380a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce220811e8178f4befe88380a" title="4. 画面更新机制"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">4. 画面更新机制</span></span></span></h4><div class="notion-text notion-block-33c9b82ce22081c2aa96c71946d58e03"><span class="notion-default">通过OBS API实现画面的动态更新：</span></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-33c9b82ce2208161a32acceba1fc1bc9" data-id="33c9b82ce2208161a32acceba1fc1bc9"><span><div id="33c9b82ce2208161a32acceba1fc1bc9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce2208161a32acceba1fc1bc9" title="性能优化与注意事项"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">性能优化与注意事项</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33c9b82ce22081a2a58dd4c996201e39" data-id="33c9b82ce22081a2a58dd4c996201e39"><span><div id="33c9b82ce22081a2a58dd4c996201e39" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce22081a2a58dd4c996201e39" title="1. 性能优化措施"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">1. 性能优化措施</span></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-33c9b82ce2208143a0d3c4682778e7b7" style="list-style-type:decimal"><li><span class="notion-default">使用线程池管理监控线程</span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-33c9b82ce22081e99d8ee570bc88c4d5" style="list-style-type:decimal"><li><span class="notion-default">实现缓存机制减少API调用</span></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-33c9b82ce2208119aef5f0c60d5f6d58" style="list-style-type:decimal"><li><span class="notion-default">优化计算逻辑，减少不必要的运算</span></li></ol><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33c9b82ce220813fb4d1d43790771788" data-id="33c9b82ce220813fb4d1d43790771788"><span><div id="33c9b82ce220813fb4d1d43790771788" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce220813fb4d1d43790771788" title="2. 潜在问题与解决方案"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">2. 潜在问题与解决方案</span></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-33c9b82ce220812b9864fe8c8dfef507" style="list-style-type:decimal"><li><span class="notion-default">资源占用问题</span></li><ol class="notion-list notion-list-numbered notion-block-33c9b82ce220812b9864fe8c8dfef507" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081dc8a34d61175561c13"><li><span class="notion-default">问题：频繁的鼠标位置检测可能导致CPU使用率升高</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce2208184a813d2a862200b70"><li><span class="notion-default">解决：实现动态检测频率调整</span></li></ul></ol></ol><ol start="2" class="notion-list notion-list-numbered notion-block-33c9b82ce22081539f40d05fd5041b34" style="list-style-type:decimal"><li><span class="notion-default">画面抖动问题</span></li><ol class="notion-list notion-list-numbered notion-block-33c9b82ce22081539f40d05fd5041b34" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081a68e61fb94297e4526"><li><span class="notion-default">问题：快速移动时可能出现画面抖动</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081cd9b84caf42134e156"><li><span class="notion-default">解决：添加平滑过渡和防抖动算法</span></li></ul></ol></ol><ol start="3" class="notion-list notion-list-numbered notion-block-33c9b82ce22081cdbf7fd8d1a597b4b4" style="list-style-type:decimal"><li><span class="notion-default">边界处理问题</span></li><ol class="notion-list notion-list-numbered notion-block-33c9b82ce22081cdbf7fd8d1a597b4b4" style="list-style-type:lower-alpha"><ul class="notion-list notion-list-disc notion-block-33c9b82ce220812da76eea7c7097be14"><li><span class="notion-default">问题：在画面边缘可能出现黑边</span></li></ul><ul class="notion-list notion-list-disc notion-block-33c9b82ce22081cf8005f41e8f5ac3b1"><li><span class="notion-default">解决：实现智能边界检测和处理</span></li></ul></ol></ol><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-33c9b82ce2208190af00f19f50e477a6" data-id="33c9b82ce2208190af00f19f50e477a6"><span><div id="33c9b82ce2208190af00f19f50e477a6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce2208190af00f19f50e477a6" title="改进建议"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">改进建议</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33c9b82ce22081d0a313f6ac7290f45e" data-id="33c9b82ce22081d0a313f6ac7290f45e"><span><div id="33c9b82ce22081d0a313f6ac7290f45e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce22081d0a313f6ac7290f45e" title="1. 功能扩展"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">1. 功能扩展</span></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-33c9b82ce22081269f83fc3c4146e0ec" style="list-style-type:decimal"><li><span class="notion-default">添加自定义热键支持</span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-33c9b82ce22081abb55de120df8f58d5" style="list-style-type:decimal"><li><span class="notion-default">实现多显示器支持</span></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-33c9b82ce22081f9a5a0d858fde291bc" style="list-style-type:decimal"><li><span class="notion-default">添加预设配置管理</span></li></ol><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33c9b82ce22081c8b6b7df13af9c743d" data-id="33c9b82ce22081c8b6b7df13af9c743d"><span><div id="33c9b82ce22081c8b6b7df13af9c743d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce22081c8b6b7df13af9c743d" title="2. 性能优化"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">2. 性能优化</span></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-33c9b82ce22081098db8cd063591c46b" style="list-style-type:decimal"><li><span class="notion-default">使用C++重写核心算法</span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-33c9b82ce22081848956e6079dabb8d3" style="list-style-type:decimal"><li><span class="notion-default">实现GPU加速支持</span></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-33c9b82ce2208186b425fd37bb041f86" style="list-style-type:decimal"><li><span class="notion-default">优化内存使用</span></li></ol><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33c9b82ce22081ada0a3ef5b7fc7d3a5" data-id="33c9b82ce22081ada0a3ef5b7fc7d3a5"><span><div id="33c9b82ce22081ada0a3ef5b7fc7d3a5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce22081ada0a3ef5b7fc7d3a5" title="3. 用户体验"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">3. 用户体验</span></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-33c9b82ce2208196ab43d7a3e8713023" style="list-style-type:decimal"><li><span class="notion-default">添加可视化配置界面</span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-33c9b82ce2208129b899d7c89bfb27e4" style="list-style-type:decimal"><li><span class="notion-default">实现配置文件导入/导出</span></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-33c9b82ce2208163a869f9128aabcd74" style="list-style-type:decimal"><li><span class="notion-default">添加实时预览功能</span></li></ol><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-33c9b82ce22081788435d5a367601ead" data-id="33c9b82ce22081788435d5a367601ead"><span><div id="33c9b82ce22081788435d5a367601ead" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce22081788435d5a367601ead" title="总结"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">总结</span></span></span></h3><div class="notion-text notion-block-33c9b82ce22081749911e43f223aa023"><span class="notion-default">本插件通过巧妙的算法设计和多线程处理，实现了流畅的智能画面缩放效果。虽然还有一些优化空间，但已经能够很好地满足大多数直播场景的需求。通过合理的参数配置和优化措施，可以在提供良好用户体验的同时，保持较低的系统资源占用。</span></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-33c9b82ce220817a915dd3e8e565194b" data-id="33c9b82ce220817a915dd3e8e565194b"><span><div id="33c9b82ce220817a915dd3e8e565194b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33c9b82ce220817a915dd3e8e565194b" title="参考资料"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">参考资料</span></span></span></h3><ol start="1" class="notion-list notion-list-numbered notion-block-33c9b82ce2208113931cf2914d9f06a4" style="list-style-type:decimal"><li><span class="notion-default">OBS Studio Python API文档</span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-33c9b82ce220812aac39d4a37d4638d4" style="list-style-type:decimal"><li><span class="notion-default">PyAutoGUI官方文档</span></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-33c9b82ce220818080e8fa4bef152c2a" style="list-style-type:decimal"><li><span class="notion-default">Python多线程编程指南</span></li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-33c9b82ce2208191a233f35188c0b7ef" style="list-style-type:decimal"><li><span class="notion-default">计算机图形学基础 - 图像缩放算法</span></li></ol></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[obsidian插件-yuhanbo-iflow，将iFlow CLI集成到Obsidian]]></title>
            <link>https://docs.sanrenjz.com/article/obsidian插件-yuhanbo-iflow，将iFlow CLI集成到Obsidian</link>
            <guid>https://docs.sanrenjz.com/article/obsidian插件-yuhanbo-iflow，将iFlow CLI集成到Obsidian</guid>
            <pubDate>Mon, 06 Apr 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[obsidian-yuhanbo-iflow 是一款功能丰富的 Obsidian 插件，旨在将 iFlow CLI（一个基于 WebSocket 的 AI 代理框架）无缝集成到 Obsidian 知识]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-33b9b82ce220816fbf6cdd6d0a4192d5"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><div class="notion-text notion-block-33b9b82ce22081d6b57ae8e13c62f660"><span class="notion-default">obsidian-yuhanbo-iflow 是一款功能丰富的 Obsidian 插件，旨在将 iFlow CLI（一个基于 WebSocket 的 AI 代理框架）无缝集成到 Obsidian 知识管理环境中。本文将从代码架构、核心模块、关键算法和设计模式四个维度，深入分析这款插件的实现细节，帮助开发者理解其技术选型与工程实践。</span></div><div class="notion-text notion-block-33b9b82ce2208158b2b0f1010ae33b65"><span class="notion-default">插件版本为 1.1.1，基于 TypeScript 编写，通过 esbuild 打包，最低要求 Obsidian 0.15.0，目前仅支持桌面端（</span><span class="notion-default"><code class="notion-inline-code">isDesktopOnly: true</code></span><span class="notion-default">）。</span></div><div class="notion-text notion-block-33b9b82ce22081068972f467e4947b90"><span class="notion-default">github 开源地址：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/yuhanbo758/obsidian-yuhanbo-iflow">yuhanbo758/obsidian-yuhanbo-iflow: Integrate iFlow CLI into Obsidian</a></span></div><div class="notion-text notion-block-33b9b82ce22081b585a1fab6e11f2b44"><span class="notion-default">gitee 开源地址：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://gitee.com/yuhanbo758/obsidian-yuhanbo-iflow">obsidian-yuhanbo-iflow: Integrate iFlow CLI into Obsidian</a></span></div><div class="notion-text notion-block-33b9b82ce22081c79fa4ded8c97892c0"><span class="notion-default">bili 视频：</span><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.bilibili.com/video/BV1rRDvBFE33/?vd_source=247ac77d4ae7339ea06d0fec09aa8f70">obsidian插件-yuhanbo-iflow，将iFlow CLI集成到Obsidian_哔哩哔哩_bilibili</a></span></div><div class="notion-text notion-block-33b9b82ce2208129aa4ff9b8bb75550b"><span class="notion-default"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://shop.sanrenjz.com/product/69d44995cc92ff8fa15356a8">程序小店 - obsidian插件-yuhanbo-iflow</a></span></div><hr class="notion-hr notion-block-33b9b82ce22081d0916fec1cf7662107"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-33b9b82ce22081429129cb2497ff12fe" data-id="33b9b82ce22081429129cb2497ff12fe"><span><div id="33b9b82ce22081429129cb2497ff12fe" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce22081429129cb2497ff12fe" title="一、整体架构"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">一、整体架构</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33b9b82ce22081bdb53dd40e00803e5d" data-id="33b9b82ce22081bdb53dd40e00803e5d"><span><div id="33b9b82ce22081bdb53dd40e00803e5d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce22081bdb53dd40e00803e5d" title="1.1 项目结构"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">1.1 项目结构</span></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33b9b82ce22081f2bb9ef916aad54035" data-id="33b9b82ce22081f2bb9ef916aad54035"><span><div id="33b9b82ce22081f2bb9ef916aad54035" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce22081f2bb9ef916aad54035" title="1.2 分层设计"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">1.2 分层设计</span></span></span></h4><div class="notion-text notion-block-33b9b82ce220812ba3c7eccccdc6e88d"><span class="notion-default">插件采用清晰的三层架构：</span></div><ol start="1" class="notion-list notion-list-numbered notion-block-33b9b82ce2208196a2c8e7d3e9425674" style="list-style-type:decimal"><li><span class="notion-default"><b>适配器层（Adapter Layer）</b></span><span class="notion-default">：</span><span class="notion-default"><code class="notion-inline-code">ICLIAdapter</code></span><span class="notion-default"> 接口 + </span><span class="notion-default"><code class="notion-inline-code">IFlowAdapter</code></span><span class="notion-default"> 实现，隔离具体 CLI 后端</span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-33b9b82ce220816eba9dee8f19d17b12" style="list-style-type:decimal"><li><span class="notion-default"><b>视图层（View Layer）</b></span><span class="notion-default">：</span><span class="notion-default"><code class="notion-inline-code">IFlowChatView</code></span><span class="notion-default"> 继承 </span><span class="notion-default"><code class="notion-inline-code">ItemView</code></span><span class="notion-default">，负责 UI 渲染与用户交互</span></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-33b9b82ce22081e6b57ecb3d4a6fd4fb" style="list-style-type:decimal"><li><span class="notion-default"><b>插件核心层（Plugin Core）</b></span><span class="notion-default">：</span><span class="notion-default"><code class="notion-inline-code">IFlowPlugin</code></span><span class="notion-default"> 继承 </span><span class="notion-default"><code class="notion-inline-code">Plugin</code></span><span class="notion-default">，负责生命周期管理、设置存储、命令注册</span></li></ol><div class="notion-text notion-block-33b9b82ce22081938bb0d33474efa126"><span class="notion-default">这种设计使得未来替换 AI 后端（如接入其他 CLI 工具）只需新增一个适配器实现，无需修改视图层代码。</span></div><hr class="notion-hr notion-block-33b9b82ce2208182b211dddc580026b4"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-33b9b82ce2208106bb3ef79b2aded8f9" data-id="33b9b82ce2208106bb3ef79b2aded8f9"><span><div id="33b9b82ce2208106bb3ef79b2aded8f9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce2208106bb3ef79b2aded8f9" title="二、核心接口与适配器模式"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">二、核心接口与适配器模式</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33b9b82ce2208151bf78d7eca19e6ba6" data-id="33b9b82ce2208151bf78d7eca19e6ba6"><span><div id="33b9b82ce2208151bf78d7eca19e6ba6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce2208151bf78d7eca19e6ba6" title="2.1 CLIMessage 统一消息类型"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">2.1 CLIMessage 统一消息类型</span></span></span></h4><div class="notion-text notion-block-33b9b82ce220815eabddc3ed45dafec7"><span class="notion-default">这个接口将来自不同后端的消息统一抽象为四种类型：</span></div><ul class="notion-list notion-list-disc notion-block-33b9b82ce220812092ace4c0ccc9703e"><li><span class="notion-default"><code class="notion-inline-code">assistant</code></span><span class="notion-default">：AI 文本输出块（流式）</span></li></ul><ul class="notion-list notion-list-disc notion-block-33b9b82ce22081929afbe139d3a17bf5"><li><span class="notion-default"><code class="notion-inline-code">tool_call</code></span><span class="notion-default">：工具调用事件（含工具名、参数、输出）</span></li></ul><ul class="notion-list notion-list-disc notion-block-33b9b82ce2208180badbc4a49d84b87f"><li><span class="notion-default"><code class="notion-inline-code">task_finish</code></span><span class="notion-default">：任务结束信号</span></li></ul><ul class="notion-list notion-list-disc notion-block-33b9b82ce2208121984be593666af42e"><li><span class="notion-default"><code class="notion-inline-code">error</code></span><span class="notion-default">：错误信息</span></li></ul><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33b9b82ce22081a0877fdb6862b526ee" data-id="33b9b82ce22081a0877fdb6862b526ee"><span><div id="33b9b82ce22081a0877fdb6862b526ee" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce22081a0877fdb6862b526ee" title="2.2 ICLIAdapter 接口"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">2.2 ICLIAdapter 接口</span></span></span></h4><div class="notion-text notion-block-33b9b82ce2208109b512c3a8bf447133"><span class="notion-default">接口的关键设计是 </span><span class="notion-default"><code class="notion-inline-code">receiveMessages()</code></span><span class="notion-default"> 返回 </span><span class="notion-default"><code class="notion-inline-code">AsyncIterable&lt;CLIMessage&gt;</code></span><span class="notion-default">，这使得消息消费方可以用 </span><span class="notion-default"><code class="notion-inline-code">for await...of</code></span><span class="notion-default"> 语法以异步迭代方式处理流式响应，代码极为简洁。</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33b9b82ce220814d9d44dfa59fbd3d97" data-id="33b9b82ce220814d9d44dfa59fbd3d97"><span><div id="33b9b82ce220814d9d44dfa59fbd3d97" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce220814d9d44dfa59fbd3d97" title="2.3 IFlowAdapter 实现细节"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">2.3 IFlowAdapter 实现细节</span></span></span></h4><div class="notion-text notion-block-33b9b82ce220813594f9f48bb917b51b"><span class="notion-default"><code class="notion-inline-code">IFlowAdapter</code></span><span class="notion-default"> 是目前唯一的适配器实现，封装了 </span><span class="notion-default"><code class="notion-inline-code">@iflow-ai/iflow-cli-sdk</code></span><span class="notion-default"> 的 </span><span class="notion-default"><code class="notion-inline-code">IFlowClient</code></span><span class="notion-default">。</span></div><div class="notion-text notion-block-33b9b82ce2208121adc2f101907e01a7"><span class="notion-default"><b>连接流程（含端口管理）：</b></span></div><div class="notion-text notion-block-33b9b82ce220817a906ee835cab27669"><span class="notion-default">端口检测使用 TCP Socket 探测而非 HTTP 请求，避免了不必要的协议开销：</span></div><hr class="notion-hr notion-block-33b9b82ce22081f9a400e0217890101f"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-33b9b82ce220816485acfaf760d6d96c" data-id="33b9b82ce220816485acfaf760d6d96c"><span><div id="33b9b82ce220816485acfaf760d6d96c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce220816485acfaf760d6d96c" title="三、聊天视图（IFlowChatView）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">三、聊天视图（IFlowChatView）</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33b9b82ce22081acb6eee20360b17391" data-id="33b9b82ce22081acb6eee20360b17391"><span><div id="33b9b82ce22081acb6eee20360b17391" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce22081acb6eee20360b17391" title="3.1 视图生命周期"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">3.1 视图生命周期</span></span></span></h4><div class="notion-text notion-block-33b9b82ce220810382a2eee2c6fa9f03"><span class="notion-default"><code class="notion-inline-code">IFlowChatView</code></span><span class="notion-default"> 继承自 Obsidian 的 </span><span class="notion-default"><code class="notion-inline-code">ItemView</code></span><span class="notion-default">，通过 </span><span class="notion-default"><code class="notion-inline-code">onOpen()</code></span><span class="notion-default"> 构建整个 UI 树：</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33b9b82ce220811bafd3c753926cfad0" data-id="33b9b82ce220811bafd3c753926cfad0"><span><div id="33b9b82ce220811bafd3c753926cfad0" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce220811bafd3c753926cfad0" title="3.2 消息渲染机制"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">3.2 消息渲染机制</span></span></span></h4><div class="notion-text notion-block-33b9b82ce2208181b6a5e4f18a093fd5"><span class="notion-default">用户消息使用 </span><span class="notion-default"><code class="notion-inline-code">setText()</code></span><span class="notion-default"> 以纯文本渲染（防止 XSS），AI 消息使用 Obsidian 原生的 </span><span class="notion-default"><code class="notion-inline-code">MarkdownRenderer.render()</code></span><span class="notion-default"> 渲染为完整的 Markdown HTML：</span></div><div class="notion-text notion-block-33b9b82ce22081ceaba6c5b6a3ab926e"><span class="notion-default">内部链接点击事件通过事件委托统一处理，调用 </span><span class="notion-default"><code class="notion-inline-code">app.workspace.openLinkText()</code></span><span class="notion-default"> 触发 Obsidian 原生导航。</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33b9b82ce2208172b433d1f1f4f37027" data-id="33b9b82ce2208172b433d1f1f4f37027"><span><div id="33b9b82ce2208172b433d1f1f4f37027" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce2208172b433d1f1f4f37027" title="3.3 流式输出处理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">3.3 流式输出处理</span></span></span></h4><div class="notion-text notion-block-33b9b82ce22081b28dccdaa553214c14"><span class="notion-default">AI 响应以流式块方式到达，视图通过追加 DOM 文本节点实现实时更新：</span></div><div class="notion-text notion-block-33b9b82ce220819c8e78db9d2a854514"><span class="notion-default">停止生成通过调用 </span><span class="notion-default"><code class="notion-inline-code">IFlowAdapter.stopGeneration()</code></span><span class="notion-default"> → </span><span class="notion-default"><code class="notion-inline-code">client.interrupt()</code></span><span class="notion-default"> 实现，并设置 </span><span class="notion-default"><code class="notion-inline-code">stopRequested</code></span><span class="notion-default"> 标志位使消费循环提前退出。</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33b9b82ce220814aaf64c1cb1506d641" data-id="33b9b82ce220814aaf64c1cb1506d641"><span><div id="33b9b82ce220814aaf64c1cb1506d641" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce220814aaf64c1cb1506d641" title="3.4 斜杠命令系统"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">3.4 斜杠命令系统</span></span></span></h4><div class="notion-text notion-block-33b9b82ce22081fbb5d3fb3291b5ddde"><span class="notion-default">输入框监听 </span><span class="notion-default"><code class="notion-inline-code">input</code></span><span class="notion-default"> 事件，检测到首字符为 </span><span class="notion-default"><code class="notion-inline-code">/</code></span><span class="notion-default"> 时弹出 </span><span class="notion-default"><code class="notion-inline-code">SlashCommandSuggestModal</code></span><span class="notion-default">：</span></div><div class="notion-text notion-block-33b9b82ce2208191a167eabdb81c6f69"><span class="notion-default">支持的命令：</span></div><table class="notion-simple-table notion-block-33b9b82ce220810c9dcfc51b43a70dfd"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-33b9b82ce220814f8f82e8ff8b945094"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">命令</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">功能</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce22081bd80bbd70a0f4bd7b1"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default"><code class="notion-inline-code">/new</code></span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">清空对话</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce220816091b8fb9d91689ac7"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default"><code class="notion-inline-code">/save</code></span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">保存对话到 Markdown 文件</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce22081028226ced7ec7e6504"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default"><code class="notion-inline-code">/compress</code></span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">压缩对话历史</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce22081af85e2eaacc9c29118"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default"><code class="notion-inline-code">/skills</code></span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">列出可用技能</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce22081e6ab67d2fee5477596"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default"><code class="notion-inline-code">/stop</code></span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">停止生成</span></div></td></tr></tbody></table><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33b9b82ce22081afb22fe5c189bde157" data-id="33b9b82ce22081afb22fe5c189bde157"><span><div id="33b9b82ce22081afb22fe5c189bde157" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce22081afb22fe5c189bde157" title="3.5 文件写入标签解析"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">3.5 文件写入标签解析</span></span></span></h4><div class="notion-text notion-block-33b9b82ce22081229688f5c08c182174"><span class="notion-default">AI 响应中可包含特殊标签，插件自动解析并写入 Obsidian Vault：</span></div><div class="notion-text notion-block-33b9b82ce2208194a4f9ff8129ddc3aa"><span class="notion-default">解析时进行严格的路径安全校验，拒绝绝对路径和包含 </span><span class="notion-default"><code class="notion-inline-code">..</code></span><span class="notion-default"> 的路径，防止路径遍历攻击：</span></div><hr class="notion-hr notion-block-33b9b82ce22081578a10ddbd28d8481c"/><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-33b9b82ce2208114bf78cd90b35bb865"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column"><img src="https://xz.sanrenjz.com/image/obsidian%E6%8F%92%E4%BB%B6-yuhanbo-iflow%EF%BC%8C%E5%B0%86iFlow%20CLI%E9%9B%86%E6%88%90%E5%88%B0Obsidian-16x9.png?imageSlim=&amp;spaceId=0ffd71f6-046a-4fc3-b642-5699b7c5ef56&amp;t=33b9b82c-e220-8114-bf78-cd90b35bb865" alt="notion image" loading="lazy" decoding="async"/></div></figure><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-33b9b82ce220815ca678e23695dbabc2" data-id="33b9b82ce220815ca678e23695dbabc2"><span><div id="33b9b82ce220815ca678e23695dbabc2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce220815ca678e23695dbabc2" title="四、BM25 加权全文搜索"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">四、BM25 加权全文搜索</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33b9b82ce22081f3a6a6c9391dbbb2ee" data-id="33b9b82ce22081f3a6a6c9391dbbb2ee"><span><div id="33b9b82ce22081f3a6a6c9391dbbb2ee" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce22081f3a6a6c9391dbbb2ee" title="4.1 BM25 算法原理"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">4.1 BM25 算法原理</span></span></span></h4><div class="notion-text notion-block-33b9b82ce22081069b71eb481762a064"><span class="notion-default">BM25（Best Match 25）是 TF-IDF 的改进版本，公式如下：</span></div><div class="notion-text notion-block-33b9b82ce22081af8f34c2b283d32f5e"><span class="notion-default"></span></div><div class="notion-text notion-block-33b9b82ce22081cd8930ef17014dcaca"><span class="notion-default">其中：</span></div><ul class="notion-list notion-list-disc notion-block-33b9b82ce220812db811c926b159cbde"><li><span class="notion-default"><code class="notion-inline-code">k1</code></span><span class="notion-default">（默认 1.2）：词频饱和参数，越大对高频词惩罚越小</span></li></ul><ul class="notion-list notion-list-disc notion-block-33b9b82ce22081b99cf1fc38f5e9da46"><li><span class="notion-default"><code class="notion-inline-code">b</code></span><span class="notion-default">（默认 0.75）：文档长度归一化参数，越大对长文档惩罚越重</span></li></ul><ul class="notion-list notion-list-disc notion-block-33b9b82ce220810581ede18e4e5d425a"><li><span class="notion-default"><code class="notion-inline-code">|D|</code></span><span class="notion-default">：文档长度，</span><span class="notion-default"><code class="notion-inline-code">avgdl</code></span><span class="notion-default">：语料库平均文档长度</span></li></ul><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33b9b82ce22081d9904ee8b8a345c4e2" data-id="33b9b82ce22081d9904ee8b8a345c4e2"><span><div id="33b9b82ce22081d9904ee8b8a345c4e2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce22081d9904ee8b8a345c4e2" title="4.2 中文 n-gram 分词"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">4.2 中文 n-gram 分词</span></span></span></h4><div class="notion-text notion-block-33b9b82ce22081c1a8caf8c30965c418"><span class="notion-default">对于中文文本，</span><span class="notion-default"><code class="notion-inline-code">weighted-search.js</code></span><span class="notion-default"> 使用 n-gram 滑动窗口切词（通常 bigram/trigram），无需外部词典：</span></div><div class="notion-text notion-block-33b9b82ce22081d3a130d6e7ddfd8bed"><span class="notion-default">这种方式虽然会产生部分无意义 n-gram，但对检索精度影响有限，且实现简单无依赖。</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33b9b82ce220818d8cfad66e4665548e" data-id="33b9b82ce220818d8cfad66e4665548e"><span><div id="33b9b82ce220818d8cfad66e4665548e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce220818d8cfad66e4665548e" title="4.3 自定义关键词权重"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">4.3 自定义关键词权重</span></span></span></h4><div class="notion-text notion-block-33b9b82ce22081deb3fccb507d64ac2f"><span class="notion-default">用户可配置关键词权重，格式为 </span><span class="notion-default"><code class="notion-inline-code">关键词=权重</code></span><span class="notion-default">，解析逻辑：</span></div><div class="notion-text notion-block-33b9b82ce22081859001da566e4a153d"><span class="notion-default">支持 =、:、空格三种分隔符，以 </span><span class="notion-default"><code class="notion-inline-code">#</code></span><span class="notion-default"> 开头的行视为注释。</span></div><hr class="notion-hr notion-block-33b9b82ce22081a189c4dc23d088719f"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-33b9b82ce22081e7b597e407d547ebef" data-id="33b9b82ce22081e7b597e407d547ebef"><span><div id="33b9b82ce22081e7b597e407d547ebef" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce22081e7b597e407d547ebef" title="五、技能路径系统"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">五、技能路径系统</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33b9b82ce220813eb1ace734373f557c" data-id="33b9b82ce220813eb1ace734373f557c"><span><div id="33b9b82ce220813eb1ace734373f557c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce220813eb1ace734373f557c" title="5.1 路径解析（skills-paths.js）"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">5.1 路径解析（skills-paths.js）</span></span></span></h4><div class="notion-text notion-block-33b9b82ce22081dc9d60dac9d6a3130e"><span class="notion-default">技能路径支持三种格式：</span></div><ol start="1" class="notion-list notion-list-numbered notion-block-33b9b82ce220815e9b4aedf40606559f" style="list-style-type:decimal"><li><span class="notion-default"><b>Windows 绝对路径</b></span><span class="notion-default">：</span><span class="notion-default"><code class="notion-inline-code">C:\Users\...\skills</code></span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-33b9b82ce22081bfb1d6f2dbdf9d4cc5" style="list-style-type:decimal"><li><span class="notion-default"><b>Unix 绝对路径</b></span><span class="notion-default">：</span><span class="notion-default"><code class="notion-inline-code">/home/.../skills</code></span></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-33b9b82ce220818491c1ecfd5170cce6" style="list-style-type:decimal"><li><span class="notion-default"><b>Vault 相对路径</b></span><span class="notion-default">：</span><span class="notion-default"><code class="notion-inline-code">AI/skills</code></span><span class="notion-default">（相对于 Vault 根目录）</span></li></ol><div class="notion-text notion-block-33b9b82ce220811c95aacfd8ba9ba312"><span class="notion-default"><code class="notion-inline-code">resolveSkillsPathsAbs()</code></span><span class="notion-default"> 将所有路径转为绝对路径，并注入到 </span><span class="notion-default"><code class="notion-inline-code">IFLOW_SKILLS_PATHS</code></span><span class="notion-default"> 环境变量传递给子进程：</span></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33b9b82ce22081f1812fd47248d80688" data-id="33b9b82ce22081f1812fd47248d80688"><span><div id="33b9b82ce22081f1812fd47248d80688" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce22081f1812fd47248d80688" title="5.2 项目技能初始化"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">5.2 项目技能初始化</span></span></span></h4><div class="notion-text notion-block-33b9b82ce2208154bc1cd94f1ac140b0"><span class="notion-default"><code class="notion-inline-code">ensureProjectSkills()</code></span><span class="notion-default"> 确保每个工作目录下存在技能软链接或复制，使 iFlow CLI 能够发现项目特定技能。</span></div><hr class="notion-hr notion-block-33b9b82ce220815cbd0cdb3108d196ef"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-33b9b82ce22081d28ef7c25ed4b76868" data-id="33b9b82ce22081d28ef7c25ed4b76868"><span><div id="33b9b82ce22081d28ef7c25ed4b76868" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce22081d28ef7c25ed4b76868" title="六、定时任务系统"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">六、定时任务系统</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33b9b82ce2208165a6bdc5063bb80847" data-id="33b9b82ce2208165a6bdc5063bb80847"><span><div id="33b9b82ce2208165a6bdc5063bb80847" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce2208165a6bdc5063bb80847" title="6.1 任务数据结构"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">6.1 任务数据结构</span></span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33b9b82ce22081b9a99be8c04e5fe1db" data-id="33b9b82ce22081b9a99be8c04e5fe1db"><span><div id="33b9b82ce22081b9a99be8c04e5fe1db" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce22081b9a99be8c04e5fe1db" title="6.2 调度实现"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">6.2 调度实现</span></span></span></h4><div class="notion-text notion-block-33b9b82ce22081a9b12ee1f11d91c2df"><span class="notion-default">插件在 </span><span class="notion-default"><code class="notion-inline-code">onload()</code></span><span class="notion-default"> 时注册所有任务的定时器（</span><span class="notion-default"><code class="notion-inline-code">setInterval</code></span><span class="notion-default"> + </span><span class="notion-default"><code class="notion-inline-code">setTimeout</code></span><span class="notion-default">），并在 </span><span class="notion-default"><code class="notion-inline-code">onunload()</code></span><span class="notion-default"> 时清除，避免内存泄漏。任务触发时读取 </span><span class="notion-default"><code class="notion-inline-code">sourcePath</code></span><span class="notion-default"> 文件内容作为提示词发送给 AI，将结果写入 </span><span class="notion-default"><code class="notion-inline-code">targetPath</code></span><span class="notion-default"> 文件夹。</span></div><hr class="notion-hr notion-block-33b9b82ce22081909583e7e65c7636f9"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-33b9b82ce22081f0a702da86b81f0f79" data-id="33b9b82ce22081f0a702da86b81f0f79"><span><div id="33b9b82ce22081f0a702da86b81f0f79" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce22081f0a702da86b81f0f79" title="七、插件设置面板"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">七、插件设置面板</span></span></span></h3><div class="notion-text notion-block-33b9b82ce220811e865ae5194c64a106"><span class="notion-default">设置通过 </span><span class="notion-default"><code class="notion-inline-code">IFlowSettingTab</code></span><span class="notion-default">（继承 </span><span class="notion-default"><code class="notion-inline-code">PluginSettingTab</code></span><span class="notion-default">）实现，使用 Obsidian 原生的 </span><span class="notion-default"><code class="notion-inline-code">Setting</code></span><span class="notion-default"> API 构建表单，支持以下配置项：</span></div><table class="notion-simple-table notion-block-33b9b82ce220816bbad5dd317ade492b"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-33b9b82ce22081f6851bc140599faefb"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">配置</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">类型</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">说明</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce22081d79621d9e70b2486ab"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">iFlowUrl</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">文本</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">WebSocket 连接地址</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce22081a29987f0f2560aac11"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">iFlowPath</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">文本</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">CLI 可执行文件目录</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce22081b3a1c0d51b1a5dd44c"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">autoStartProcess</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">开关</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">自动启动后台进程</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce220810ca896f94f370e6e8a"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">templatePaths</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">文本域</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">模板文件夹（多路径）</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce22081d7a278e5ed1a473c56"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">skillsPaths</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">文本域</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">技能文件夹（多路径）</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce22081d29686e3f09511c396"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">chatSavePath</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">文本</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">对话保存目录</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce22081078b4aeae4d7636354"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">searchTopN</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">数字</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">搜索返回条数</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce2208167ae4cdaf5edea402d"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">searchBm25K1/B</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">数字</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">BM25 参数</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce2208166ae10f592e08a8230"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">searchKeywordWeights</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">文本域</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">关键词权重配置</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce2208197a3b3f17852045d79"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">邮件配置</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">多项</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">SMTP 参数</span></div></td></tr></tbody></table><hr class="notion-hr notion-block-33b9b82ce22081e5a937cfc13263bd27"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-33b9b82ce220817e9e4bd57d8dbe6a03" data-id="33b9b82ce220817e9e4bd57d8dbe6a03"><span><div id="33b9b82ce220817e9e4bd57d8dbe6a03" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce220817e9e4bd57d8dbe6a03" title="八、代码流程图"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">八、代码流程图</span></span></span></h3><hr class="notion-hr notion-block-33b9b82ce22081799977d9423f14a04e"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-33b9b82ce22081aaa314c526f8a647f7" data-id="33b9b82ce22081aaa314c526f8a647f7"><span><div id="33b9b82ce22081aaa314c526f8a647f7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce22081aaa314c526f8a647f7" title="九、潜在限制与改进建议"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">九、潜在限制与改进建议</span></span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33b9b82ce220813f905cee9ffe49a83d" data-id="33b9b82ce220813f905cee9ffe49a83d"><span><div id="33b9b82ce220813f905cee9ffe49a83d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce220813f905cee9ffe49a83d" title="9.1 当前限制"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">9.1 当前限制</span></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-33b9b82ce22081748eacf6318a98ad89" style="list-style-type:decimal"><li><span class="notion-default"><b>单适配器架构</b></span><span class="notion-default">：目前仅支持 iFlow CLI 后端，扩展性受限于 ICLIAdapter 接口的设计完整性</span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-33b9b82ce220813dbc53df92a031e62b" style="list-style-type:decimal"><li><span class="notion-default"><b>main.ts 文件过大</b></span><span class="notion-default">：4000+ 行的单文件包含所有逻辑，建议按模块拆分（视图、适配器、设置面板、工具函数）</span></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-33b9b82ce22081eba5edf633dc445459" style="list-style-type:decimal"><li><span class="notion-default"><b>搜索索引重建开销</b></span><span class="notion-default">：每次插件加载时需重建 BM25 索引，对大型 Vault 可能有性能影响</span></li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-33b9b82ce2208164a330fa59dd3804f6" style="list-style-type:decimal"><li><span class="notion-default"><b>定时任务持久化</b></span><span class="notion-default">：任务状态仅存储在设置中，重启 Obsidian 后执行记录丢失</span></li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-33b9b82ce220816db4e8ed8743832511" style="list-style-type:decimal"><li><span class="notion-default"><b>流式响应内存</b></span><span class="notion-default">：流式追加时通过 </span><span class="notion-default"><code class="notion-inline-code">contentEl.empty()</code></span><span class="notion-default"> + 重渲染实现，频繁调用可能导致 DOM 抖动</span></li></ol><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-33b9b82ce220819691e7e0da2698317d" data-id="33b9b82ce220819691e7e0da2698317d"><span><div id="33b9b82ce220819691e7e0da2698317d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce220819691e7e0da2698317d" title="9.2 改进建议"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">9.2 改进建议</span></span></span></h4><ol start="1" class="notion-list notion-list-numbered notion-block-33b9b82ce2208199bd41ee587471e1d9" style="list-style-type:decimal"><li><span class="notion-default"><b>代码分割</b></span><span class="notion-default">：将 </span><span class="notion-default"><code class="notion-inline-code">IFlowChatView</code></span><span class="notion-default">、</span><span class="notion-default"><code class="notion-inline-code">IFlowAdapter</code></span><span class="notion-default">、</span><span class="notion-default"><code class="notion-inline-code">IFlowSettingTab</code></span><span class="notion-default"> 分别提取到独立文件</span></li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-33b9b82ce22081f1b1f4ee3961140ca9" style="list-style-type:decimal"><li><span class="notion-default"><b>索引缓存</b></span><span class="notion-default">：将 BM25 索引序列化缓存到 </span><span class="notion-default"><code class="notion-inline-code">data.json</code></span><span class="notion-default">，仅在文件变化时增量更新</span></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-33b9b82ce2208152b1c3c8f02cb34f71" style="list-style-type:decimal"><li><span class="notion-default"><b>虚拟滚动</b></span><span class="notion-default">：对长对话历史引入虚拟列表，避免 DOM 节点过多</span></li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-33b9b82ce220818abadfc9ac461d8166" style="list-style-type:decimal"><li><span class="notion-default"><b>多适配器支持</b></span><span class="notion-default">：扩展 </span><span class="notion-default"><code class="notion-inline-code">ICLIAdapter</code></span><span class="notion-default"> 支持 OpenAI API / Ollama 等更多后端</span></li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-33b9b82ce22081bf94f2e1a05634d442" style="list-style-type:decimal"><li><span class="notion-default"><b>错误重试策略</b></span><span class="notion-default">：在网络抖动场景下，WebSocket 断线后自动重连而非依赖用户手动重连</span></li></ol><hr class="notion-hr notion-block-33b9b82ce220811e9a43da29c5f48a81"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-33b9b82ce220813185f6f7a64c52f50f" data-id="33b9b82ce220813185f6f7a64c52f50f"><span><div id="33b9b82ce220813185f6f7a64c52f50f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce220813185f6f7a64c52f50f" title="十、使用的编程语言与关键库"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">十、使用的编程语言与关键库</span></span></span></h3><table class="notion-simple-table notion-block-33b9b82ce22081f08fe7f606a718d3ac"><tbody><tr class="notion-simple-table-row notion-simple-table-header-row notion-block-33b9b82ce22081d5981bc4afd3707b4b"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">技术</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">版本</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">用途</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce22081ccbe21e12363bbeccc"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">TypeScript</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">4.7.4</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">主语言，提供类型安全</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce2208178a358d895b4508b4f"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">Obsidian API</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">^1.5.7</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">插件框架、UI 组件、Vault 操作</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce220818aa136c927e9d48349"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">@iflow-ai/iflow-cli-sdk</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">^0.1.0</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">WebSocket AI 通信</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce22081c3bf0ec64e0d3b6de9"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">esbuild</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">0.17.19</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">TypeScript → JS 打包</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce2208134a085f79c5cb02f94"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">Node.js net/tls</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">内置</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">TCP 端口探测</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce220815a93aeecc84ee5fbf3"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">Node.js child_process</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">内置</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">启动 iflow 子进程</span></div></td></tr><tr class="notion-simple-table-row notion-block-33b9b82ce22081eab513e3bd67d328d5"><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">Node.js fs</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">内置</span></div></td><td class="" style="width:120px"><div class="notion-simple-table-cell"><span class="notion-default">文件系统操作</span></div></td></tr></tbody></table><hr class="notion-hr notion-block-33b9b82ce2208161b2f5dc1301931fcf"/><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-33b9b82ce22081ed860cfbad3fd3bd67" data-id="33b9b82ce22081ed860cfbad3fd3bd67"><span><div id="33b9b82ce22081ed860cfbad3fd3bd67" class="notion-header-anchor"></div><a class="notion-hash-link" href="#33b9b82ce22081ed860cfbad3fd3bd67" title="总结"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><span class="notion-default">总结</span></span></span></h3><div class="notion-text notion-block-33b9b82ce2208161b869ec80ade904b5"><span class="notion-default">obsidian-yuhanbo-iflow 通过适配器模式解耦 AI 后端，以 AsyncIterable 处理流式响应，结合 Obsidian 原生 API 实现了深度集成的 AI 助手体验。其 BM25 加权搜索、技能系统和定时任务构成了完整的知识工作自动化链路。</span></div><div class="notion-text notion-block-33b9b82ce220819caf92c77c7a9d0dec"><span class="notion-default">代码整体设计思路清晰，类型使用规范，对跨平台兼容（Windows 路径、命令查找）和健壮性（端口冲突、连接重试、路径安全校验）都有充分考量，是学习 Obsidian 插件开发和 WebSocket 流式通信的优质参考实现。</span></div></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>