farming-code 2.2.12 → 2.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.zh_cn.md +1 -1
- package/backend/agent-manager.js +4 -0
- package/backend/server.js +10 -0
- package/dist/assets/{App-DWsa7DXG.js → App-xASd_Y0F.js} +3 -3
- package/dist/assets/{index-CUFPJoa5.js → index-CYZKdoqi.js} +2 -2
- package/dist/crt-markdown-assets/KaTeX_AMS-Regular-CYEKBG2K.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_AMS-Regular-JKX5W2C4.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_AMS-Regular-U6PRYMIZ.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Caligraphic-Bold-5QL5CMTE.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Caligraphic-Bold-WZ3QSGD3.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Caligraphic-Bold-ZTS3R3HK.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Caligraphic-Regular-3LKEU76G.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Caligraphic-Regular-A7XRTZ5Q.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Caligraphic-Regular-KX5MEWCF.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Fraktur-Bold-2QVFK6NQ.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Fraktur-Bold-T4SWXBMT.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Fraktur-Bold-WGHVTYOR.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Fraktur-Regular-2PEIFJSJ.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Fraktur-Regular-5U4OPH2X.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Fraktur-Regular-PQMHCIK6.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-Bold-2GA4IZIN.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-Bold-W5FBVCZM.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-Bold-YP5VVQRP.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-BoldItalic-4P4C7HJH.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-BoldItalic-N4V3DX7S.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-BoldItalic-ODMLBJJQ.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-Italic-I43T2HSR.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-Italic-RELBIK7M.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-Italic-SASNQFN2.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-Regular-ARRPAO67.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-Regular-P5I74A2A.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Main-Regular-W74P5G27.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Math-BoldItalic-6EBV3DK5.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Math-BoldItalic-K4WTGH3J.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Math-BoldItalic-VB447A4D.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Math-Italic-6KGCHLFN.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Math-Italic-KKK3USB2.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Math-Italic-SON4MRCA.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_SansSerif-Bold-RRNVJFFW.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_SansSerif-Bold-STQ6RXC7.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_SansSerif-Bold-X5M5EMOD.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_SansSerif-Italic-HMPFTM52.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_SansSerif-Italic-PSN4QKYX.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_SansSerif-Italic-WTBAZBGY.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_SansSerif-Regular-2TL3USAE.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_SansSerif-Regular-OQCII6EP.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_SansSerif-Regular-XIQ62X4E.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Script-Regular-72OLXYNA.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Script-Regular-A5IFOEBS.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Script-Regular-APUWIHLP.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size1-Regular-4HRHTS65.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size1-Regular-5LRUTBFT.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size1-Regular-7K6AASVL.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size2-Regular-222HN3GT.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size2-Regular-K5ZHAIS6.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size2-Regular-LELKET5D.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size3-Regular-TLFPAHDE.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size3-Regular-UFCO6WCA.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size3-Regular-WQRQ47UD.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size4-Regular-7PGNVPQK.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size4-Regular-CDMV7U5C.woff2 +0 -0
- package/dist/crt-markdown-assets/KaTeX_Size4-Regular-PKMWZHNC.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Typewriter-Regular-3F5K6SQ6.ttf +0 -0
- package/dist/crt-markdown-assets/KaTeX_Typewriter-Regular-MJMFSK64.woff +0 -0
- package/dist/crt-markdown-assets/KaTeX_Typewriter-Regular-VBYJ4NRC.woff2 +0 -0
- package/dist/crt-markdown-renderer.css +1 -0
- package/dist/crt-markdown-renderer.js +361 -0
- package/dist/crt-mermaid-renderer.js +3595 -0
- package/dist/index.html +1 -1
- package/frontend/skins/crt/app.js +53 -32
- package/frontend/skins/crt/index.html +47 -31
- package/frontend/skins/crt/styles/markdown.css +251 -0
- package/frontend/skins/crt/styles/monochrome-green.css +14 -3
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ npm install --global farming-code@latest && farming daemon
|
|
|
23
23
|
|
|
24
24
|
Open the authenticated URL printed by the command, choose **New Agent**, select an Agent and workspace, and start in Chat or Terminal.
|
|
25
25
|
|
|
26
|
-

|
|
27
27
|
|
|
28
28
|
## Two Interfaces, One Runtime
|
|
29
29
|
|
package/README.zh_cn.md
CHANGED
|
@@ -23,7 +23,7 @@ npm install --global farming-code@latest && farming daemon
|
|
|
23
23
|
|
|
24
24
|
打开命令输出的带鉴权 URL,选择 **New Agent**、Agent 类型和 Workspace,然后从 Chat 或 Terminal 开始工作。
|
|
25
25
|
|
|
26
|
-

|
|
27
27
|
|
|
28
28
|
## 两套界面,同一套运行时
|
|
29
29
|
|
package/backend/agent-manager.js
CHANGED
|
@@ -2404,6 +2404,10 @@ class AgentManager extends EventEmitter {
|
|
|
2404
2404
|
if (wantsMain) {
|
|
2405
2405
|
const existingMainStart = this.findActiveMainAgentStart();
|
|
2406
2406
|
if (existingMainStart) {
|
|
2407
|
+
if (this.mainAgentId !== existingMainStart.id) {
|
|
2408
|
+
this.mainAgentId = existingMainStart.id;
|
|
2409
|
+
this.emit('update');
|
|
2410
|
+
}
|
|
2407
2411
|
console.log('Main Agent already starting or running:', existingMainStart.id);
|
|
2408
2412
|
if (callback) callback(existingMainStart.id);
|
|
2409
2413
|
return existingMainStart.id;
|
package/backend/server.js
CHANGED
|
@@ -494,6 +494,16 @@ app.get(crtEntryPath, (req, res) => {
|
|
|
494
494
|
res.redirect(308, `${crtEntryPath}/${requestUrl.search}`);
|
|
495
495
|
});
|
|
496
496
|
app.use(`${crtEntryPath}/shared`, express.static(frontendDir, { index: false }));
|
|
497
|
+
app.get(`${crtEntryPath}/crt-markdown-renderer.js`, (_req, res) => {
|
|
498
|
+
res.sendFile(path.join(distDir, 'crt-markdown-renderer.js'));
|
|
499
|
+
});
|
|
500
|
+
app.get(`${crtEntryPath}/crt-markdown-renderer.css`, (_req, res) => {
|
|
501
|
+
res.sendFile(path.join(distDir, 'crt-markdown-renderer.css'));
|
|
502
|
+
});
|
|
503
|
+
app.use(`${crtEntryPath}/crt-markdown-assets`, express.static(path.join(distDir, 'crt-markdown-assets'), { index: false }));
|
|
504
|
+
app.get(`${crtEntryPath}/crt-mermaid-renderer.js`, (_req, res) => {
|
|
505
|
+
res.sendFile(path.join(distDir, 'crt-mermaid-renderer.js'));
|
|
506
|
+
});
|
|
497
507
|
app.use(`${crtEntryPath}/`, express.static(crtFrontendDir, { index: false }));
|
|
498
508
|
app.use(BASE_PATH || '/', express.static(staticAppDir, { index: false }));
|
|
499
509
|
|