@celljs/ta-workspace 4.16.0 → 4.18.0
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/package.json +3 -3
- package/web/index.js +1929 -784
package/web/index.js
CHANGED
|
@@ -146,6 +146,12 @@ function Empty(props) {
|
|
|
146
146
|
...props
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
+
function Loading(props) {
|
|
150
|
+
const Shown = pi.ui.Loading ?? pi.ui.Skeleton;
|
|
151
|
+
return /* @__PURE__ */ React.createElement(Shown, {
|
|
152
|
+
...props
|
|
153
|
+
});
|
|
154
|
+
}
|
|
149
155
|
function Glyph({ name, size = 15 }) {
|
|
150
156
|
const Icon = Host.icon(name);
|
|
151
157
|
return /* @__PURE__ */ React.createElement(Icon, {
|
|
@@ -379,625 +385,7 @@ var TaLanguageUtil;
|
|
|
379
385
|
TaLanguageUtil2.list = list;
|
|
380
386
|
})(TaLanguageUtil || (TaLanguageUtil = {}));
|
|
381
387
|
|
|
382
|
-
// web-src/i18n.ts
|
|
383
|
-
var ZH = {
|
|
384
|
-
newFile: "新建文件…",
|
|
385
|
-
newFolder: "新建文件夹…",
|
|
386
|
-
rename: "重命名…",
|
|
387
|
-
delete: "删除",
|
|
388
|
-
open: "打开",
|
|
389
|
-
copyPath: "复制路径",
|
|
390
|
-
copyRelativePath: "复制相对路径",
|
|
391
|
-
copied: "已复制",
|
|
392
|
-
findInFolder: "在文件夹中查找…",
|
|
393
|
-
revealInExplorer: "在资源管理器中显示",
|
|
394
|
-
revealInFinder: "在 Finder 中显示",
|
|
395
|
-
revealInFileExplorer: "在文件资源管理器中显示",
|
|
396
|
-
openContainingFolder: "打开所在的文件夹",
|
|
397
|
-
revealFailed: "无法在文件管理器中显示:{message}",
|
|
398
|
-
uploadFiles: "上传文件…",
|
|
399
|
-
uploadFolder: "上传文件夹…",
|
|
400
|
-
download: "下载",
|
|
401
|
-
uploading: "正在上传 {name}",
|
|
402
|
-
uploaded: "已上传 {count} 个文件",
|
|
403
|
-
uploadFailed: "上传失败:{message}",
|
|
404
|
-
replaceTitle: "已存在 {names},要替换吗?",
|
|
405
|
-
replaceMessage: "同名的文件会被上传的文件覆盖。",
|
|
406
|
-
packing: "正在打包 {name}",
|
|
407
|
-
downloadFailed: "下载失败:{message}",
|
|
408
|
-
moveExists: "目标文件夹中已有“{name}”。",
|
|
409
|
-
moveFailed: "移动失败:{message}",
|
|
410
|
-
nameEmpty: "必须提供文件或文件夹名称。",
|
|
411
|
-
nameSlash: "文件或文件夹名称不能以斜杠开头。",
|
|
412
|
-
nameInvalid: "名称 {name} 不能用作文件或文件夹名称,请换一个。",
|
|
413
|
-
nameExists: "此位置已存在文件或文件夹 {name},请换一个名称。",
|
|
414
|
-
nameWhitespace: "文件或文件夹名称的开头或结尾有空格。",
|
|
415
|
-
deleteFile: "确定要永久删除“{name}”吗?",
|
|
416
|
-
deleteFolder: "确定要永久删除“{name}”及其内容吗?",
|
|
417
|
-
irreversible: "此操作不可撤销!",
|
|
418
|
-
createFailed: "创建失败:{message}",
|
|
419
|
-
renameFailed: "重命名失败:{message}",
|
|
420
|
-
deleteFailed: "删除失败:{message}",
|
|
421
|
-
gitM: "已修改",
|
|
422
|
-
gitA: "已添加",
|
|
423
|
-
gitD: "已删除",
|
|
424
|
-
gitR: "已重命名",
|
|
425
|
-
gitC: "已复制",
|
|
426
|
-
gitU: "未跟踪",
|
|
427
|
-
gitT: "类型已更改",
|
|
428
|
-
gitConflict: "冲突",
|
|
429
|
-
matchWholeWord: "全字匹配",
|
|
430
|
-
toggleReplace: "切换替换",
|
|
431
|
-
replacePlaceholder: "替换",
|
|
432
|
-
replace: "替换",
|
|
433
|
-
replaceAll: "全部替换",
|
|
434
|
-
replaceAllInFile: "在此文件中全部替换",
|
|
435
|
-
replaceAllInFolder: "在此文件夹中全部替换",
|
|
436
|
-
replaceAllTitle: "将 {files} 个文件中的 {count} 处匹配替换为“{text}”?",
|
|
437
|
-
cannotReplace: "{path} 太大或不是文本,不能替换。",
|
|
438
|
-
toggleDetails: "切换搜索详细信息",
|
|
439
|
-
filesToInclude: "包含的文件",
|
|
440
|
-
filesToExclude: "排除的文件",
|
|
441
|
-
excludePlaceholder: "例如 *.test.ts, dist",
|
|
442
|
-
dismiss: "关闭",
|
|
443
|
-
clearResults: "清除搜索结果",
|
|
444
|
-
expandAll: "全部展开",
|
|
445
|
-
copy: "复制",
|
|
446
|
-
mergeChanges: "合并更改",
|
|
447
|
-
commit: "提交",
|
|
448
|
-
commitMessage: "提交信息",
|
|
449
|
-
commitPlaceholder: "消息(按 {keys} 提交)",
|
|
450
|
-
commitPlaceholderBranch: "消息(按 {keys} 在“{branch}”提交)",
|
|
451
|
-
commitMessageMissing: "请先写提交信息。",
|
|
452
|
-
nothingToCommit: "没有可提交的更改。",
|
|
453
|
-
stageAllTitle: "没有暂存的更改。要暂存全部更改并直接提交吗?",
|
|
454
|
-
stageAllMessage: "会把工作区里所有更改(包括未跟踪的文件)加入这次提交。",
|
|
455
|
-
stageAllCommit: "暂存全部并提交",
|
|
456
|
-
stage: "暂存更改",
|
|
457
|
-
unstage: "取消暂存更改",
|
|
458
|
-
discard: "放弃更改",
|
|
459
|
-
stageAll: "暂存所有更改",
|
|
460
|
-
unstageAll: "取消暂存所有更改",
|
|
461
|
-
discardAll: "放弃所有更改",
|
|
462
|
-
discardOne: "确定要放弃“{name}”中的更改吗?",
|
|
463
|
-
discardMany: "确定要放弃 {count} 个文件中的更改吗?",
|
|
464
|
-
deleteUntracked: "确定要删除未跟踪的文件“{name}”吗?",
|
|
465
|
-
deleteUntrackedMany: "确定要删除 {count} 个未跟踪的文件吗?",
|
|
466
|
-
openChanges: "打开更改",
|
|
467
|
-
openFile: "打开文件",
|
|
468
|
-
pull: "拉取",
|
|
469
|
-
push: "推送",
|
|
470
|
-
fetch: "抓取",
|
|
471
|
-
pullDone: "已拉取。",
|
|
472
|
-
pushDone: "已推送。",
|
|
473
|
-
fetchDone: "已抓取。",
|
|
474
|
-
moreActions: "更多操作…",
|
|
475
|
-
viewAsTree: "以树形式查看",
|
|
476
|
-
viewAsList: "以列表形式查看",
|
|
477
|
-
aheadBehind: "领先 {ahead},落后 {behind}",
|
|
478
|
-
changes: "更改",
|
|
479
|
-
changeCount: "{count} 处更改",
|
|
480
|
-
previousChange: "上一个更改",
|
|
481
|
-
nextChange: "下一个更改",
|
|
482
|
-
inline: "内联视图",
|
|
483
|
-
sideBySide: "并排视图",
|
|
484
|
-
closeOthers: "关闭其他",
|
|
485
|
-
closeToTheRight: "关闭下方的",
|
|
486
|
-
closeToTheLeft: "关闭左侧",
|
|
487
|
-
closeTabsToTheRight: "关闭右侧",
|
|
488
|
-
closeEnded: "关闭已退出的",
|
|
489
|
-
openCount: "{count} 个已打开",
|
|
490
|
-
workbench: "工作台",
|
|
491
|
-
explorer: "资源管理器",
|
|
492
|
-
openFiles: "打开的文件",
|
|
493
|
-
search: "搜索",
|
|
494
|
-
scm: "源代码管理",
|
|
495
|
-
terminal: "终端",
|
|
496
|
-
browser: "浏览器",
|
|
497
|
-
agentNavigate: "打开网页",
|
|
498
|
-
agentBack: "网页后退",
|
|
499
|
-
agentForward: "网页前进",
|
|
500
|
-
agentReload: "刷新网页",
|
|
501
|
-
agentSnapshot: "读取网页",
|
|
502
|
-
agentClick: "点击",
|
|
503
|
-
agentType: "输入",
|
|
504
|
-
agentPress: "按键",
|
|
505
|
-
agentScroll: "滚动网页",
|
|
506
|
-
agentScreenshot: "网页截图",
|
|
507
|
-
agentEvaluate: "在网页里运行",
|
|
508
|
-
agentWait: "等待网页",
|
|
509
|
-
agentCdp: "调试网页",
|
|
510
|
-
refresh: "刷新",
|
|
511
|
-
collapseAll: "全部折叠",
|
|
512
|
-
showExcluded: "显示默认隐藏的文件(.git、.DS_Store 等)",
|
|
513
|
-
changeFolder: "切换目录",
|
|
514
|
-
followConversation: "回到对话的目录({name})",
|
|
515
|
-
loading: "加载中…",
|
|
516
|
-
empty: "空目录",
|
|
517
|
-
noOpenFiles: "没有打开的文件",
|
|
518
|
-
noOpenFilesHint: "在资源管理器、搜索或源代码管理中点击文件",
|
|
519
|
-
close: "关闭",
|
|
520
|
-
closeAll: "全部关闭",
|
|
521
|
-
searchPlaceholder: "搜索",
|
|
522
|
-
includePlaceholder: "例如 src/**/*.ts, *.md",
|
|
523
|
-
matchCase: "区分大小写",
|
|
524
|
-
useRegex: "使用正则表达式",
|
|
525
|
-
noResults: "没有结果。",
|
|
526
|
-
results: "{files} 个文件中有 {count} 个结果",
|
|
527
|
-
moreResults: "结果太多,只显示前 {count} 个。",
|
|
528
|
-
notRepository: "当前目录不是 git 仓库",
|
|
529
|
-
noChanges: "没有更改",
|
|
530
|
-
staged: "暂存的更改",
|
|
531
|
-
ahead: "领先 {count}",
|
|
532
|
-
behind: "落后 {count}",
|
|
533
|
-
newTerminal: "新建终端",
|
|
534
|
-
noTerminals: "没有打开的终端",
|
|
535
|
-
terminalEnded: "进程已退出,退出码 {code}",
|
|
536
|
-
restartTerminal: "重新启动",
|
|
537
|
-
killTerminal: "终止终端",
|
|
538
|
-
clearTerminal: "清屏",
|
|
539
|
-
paste: "粘贴",
|
|
540
|
-
selectAll: "全选",
|
|
541
|
-
renameTerminal: "重命名",
|
|
542
|
-
terminalKeys: "终端按键",
|
|
543
|
-
terminalAttention: "有新提醒",
|
|
544
|
-
pipeMode: "服务器上没有 script,终端运行在管道上:全屏程序(vim、top)和密码输入不可用。",
|
|
545
|
-
address: "输入网址或搜索",
|
|
546
|
-
back: "后退",
|
|
547
|
-
forward: "前进",
|
|
548
|
-
openExternal: "在新窗口打开",
|
|
549
|
-
recent: "最近访问",
|
|
550
|
-
home: "起始页",
|
|
551
|
-
removeRecent: "从最近访问中移除",
|
|
552
|
-
frameHint: "页面空白时,可在新窗口打开",
|
|
553
|
-
stop: "停止",
|
|
554
|
-
openBrowser: "在默认浏览器中打开",
|
|
555
|
-
loadFailed: "无法打开这个网页",
|
|
556
|
-
pageCrashed: "这个网页崩溃了",
|
|
557
|
-
retry: "重试",
|
|
558
|
-
agentDriving: "Ta 正在操作",
|
|
559
|
-
importSignIns: "导入浏览器登录状态",
|
|
560
|
-
importTitle: "导入登录状态",
|
|
561
|
-
importHint: "把所选浏览器的 Cookie 复制到这里,你和 Agent 都能直接使用已登录的网站。不导入密码和浏览记录。",
|
|
562
|
-
importFrom: "从哪个浏览器导入",
|
|
563
|
-
noProfiles: "没有找到 Chrome、Edge、Brave、Arc、Vivaldi 或 Chromium 的个人资料。",
|
|
564
|
-
importNow: "导入…",
|
|
565
|
-
importing: "导入中…",
|
|
566
|
-
imported: "已导入 {count} 个 Cookie",
|
|
567
|
-
importSkipped: "{count} 个无法读取,已跳过。",
|
|
568
|
-
importAppBound: "{count} 个受 Chrome 应用绑定加密保护,只能在网站上重新登录。",
|
|
569
|
-
clearBrowserData: "清除内置浏览器数据",
|
|
570
|
-
clearBrowserDataDetail: "删除内置浏览器的全部 Cookie、网站存储和缓存,网站都需要重新登录。",
|
|
571
|
-
clear: "清除",
|
|
572
|
-
cleared: "已清除内置浏览器数据",
|
|
573
|
-
done: "完成",
|
|
574
|
-
binary: "二进制文件,不显示内容({size})。",
|
|
575
|
-
truncated: "文件较大,只显示前 1 MB,不能编辑。",
|
|
576
|
-
line: "第 {line} 行",
|
|
577
|
-
diffTitle: "{name}(更改)",
|
|
578
|
-
stagedTitle: "{name}(已暂存)",
|
|
579
|
-
unchanged: "内容相同。",
|
|
580
|
-
skipped: "⋯ {count} 行未更改",
|
|
581
|
-
failed: "出错了:{message}",
|
|
582
|
-
preview: "预览",
|
|
583
|
-
edit: "编辑",
|
|
584
|
-
save: "保存",
|
|
585
|
-
saveFailed: "保存失败:{message}",
|
|
586
|
-
changedOnDisk: "文件已在磁盘上更改。",
|
|
587
|
-
reload: "放弃我的更改"
|
|
588
|
-
};
|
|
589
|
-
var ZH_TW = {
|
|
590
|
-
newFile: "新建檔案…",
|
|
591
|
-
newFolder: "新建資料夾…",
|
|
592
|
-
rename: "重新命名…",
|
|
593
|
-
delete: "刪除",
|
|
594
|
-
open: "開啟",
|
|
595
|
-
copyPath: "複製路徑",
|
|
596
|
-
copyRelativePath: "複製相對路徑",
|
|
597
|
-
copied: "已複製",
|
|
598
|
-
findInFolder: "在資料夾中查詢…",
|
|
599
|
-
revealInExplorer: "在資源管理器中顯示",
|
|
600
|
-
revealInFinder: "在 Finder 中顯示",
|
|
601
|
-
revealInFileExplorer: "在檔案資源管理器中顯示",
|
|
602
|
-
openContainingFolder: "開啟所在的資料夾",
|
|
603
|
-
revealFailed: "無法在檔案管理器中顯示:{message}",
|
|
604
|
-
uploadFiles: "上傳檔案…",
|
|
605
|
-
uploadFolder: "上傳資料夾…",
|
|
606
|
-
download: "下載",
|
|
607
|
-
uploading: "正在上傳 {name}",
|
|
608
|
-
uploaded: "已上傳 {count} 個檔案",
|
|
609
|
-
uploadFailed: "上傳失敗:{message}",
|
|
610
|
-
replaceTitle: "已存在 {names},要替換嗎?",
|
|
611
|
-
replaceMessage: "同名的檔案會被上傳的檔案覆蓋。",
|
|
612
|
-
packing: "正在打包 {name}",
|
|
613
|
-
downloadFailed: "下載失敗:{message}",
|
|
614
|
-
moveExists: "目標資料夾中已有「{name}」。",
|
|
615
|
-
moveFailed: "移動失敗:{message}",
|
|
616
|
-
nameEmpty: "必須提供檔案或資料夾名稱。",
|
|
617
|
-
nameSlash: "檔案或資料夾名稱不能以斜槓開頭。",
|
|
618
|
-
nameInvalid: "名稱 {name} 不能用作檔案或資料夾名稱,請換一個。",
|
|
619
|
-
nameExists: "此位置已存在檔案或資料夾 {name},請換一個名稱。",
|
|
620
|
-
nameWhitespace: "檔案或資料夾名稱的開頭或結尾有空格。",
|
|
621
|
-
deleteFile: "確定要永久刪除「{name}」嗎?",
|
|
622
|
-
deleteFolder: "確定要永久刪除「{name}」及其內容嗎?",
|
|
623
|
-
irreversible: "此操作不可撤銷!",
|
|
624
|
-
createFailed: "建立失敗:{message}",
|
|
625
|
-
renameFailed: "重新命名失敗:{message}",
|
|
626
|
-
deleteFailed: "刪除失敗:{message}",
|
|
627
|
-
gitM: "已修改",
|
|
628
|
-
gitA: "已新增",
|
|
629
|
-
gitD: "已刪除",
|
|
630
|
-
gitR: "已重新命名",
|
|
631
|
-
gitC: "已複製",
|
|
632
|
-
gitU: "未跟蹤",
|
|
633
|
-
gitT: "型別已更改",
|
|
634
|
-
gitConflict: "衝突",
|
|
635
|
-
matchWholeWord: "全字匹配",
|
|
636
|
-
toggleReplace: "切換替換",
|
|
637
|
-
replacePlaceholder: "替換",
|
|
638
|
-
replace: "替換",
|
|
639
|
-
replaceAll: "全部替換",
|
|
640
|
-
replaceAllInFile: "在此檔案中全部替換",
|
|
641
|
-
replaceAllInFolder: "在此資料夾中全部替換",
|
|
642
|
-
replaceAllTitle: "將 {files} 個檔案中的 {count} 處匹配替換為「{text}」?",
|
|
643
|
-
cannotReplace: "{path} 太大或不是文本,不能替換。",
|
|
644
|
-
toggleDetails: "切換搜尋詳細資訊",
|
|
645
|
-
filesToInclude: "包含的檔案",
|
|
646
|
-
filesToExclude: "排除的檔案",
|
|
647
|
-
excludePlaceholder: "例如 *.test.ts, dist",
|
|
648
|
-
dismiss: "關閉",
|
|
649
|
-
clearResults: "清除搜尋結果",
|
|
650
|
-
expandAll: "全部展開",
|
|
651
|
-
copy: "複製",
|
|
652
|
-
mergeChanges: "合併更改",
|
|
653
|
-
commit: "提交",
|
|
654
|
-
commitMessage: "提交資訊",
|
|
655
|
-
commitPlaceholder: "訊息(按 {keys} 提交)",
|
|
656
|
-
commitPlaceholderBranch: "訊息(按 {keys} 在「{branch}」提交)",
|
|
657
|
-
commitMessageMissing: "請先寫提交資訊。",
|
|
658
|
-
nothingToCommit: "沒有可提交的更改。",
|
|
659
|
-
stageAllTitle: "沒有暫存的更改。要暫存全部更改並直接提交嗎?",
|
|
660
|
-
stageAllMessage: "會把工作區裡所有更改(包括未跟蹤的檔案)加入這次提交。",
|
|
661
|
-
stageAllCommit: "暫存全部並提交",
|
|
662
|
-
stage: "暫存更改",
|
|
663
|
-
unstage: "取消暫存更改",
|
|
664
|
-
discard: "放棄更改",
|
|
665
|
-
stageAll: "暫存所有更改",
|
|
666
|
-
unstageAll: "取消暫存所有更改",
|
|
667
|
-
discardAll: "放棄所有更改",
|
|
668
|
-
discardOne: "確定要放棄「{name}」中的更改嗎?",
|
|
669
|
-
discardMany: "確定要放棄 {count} 個檔案中的更改嗎?",
|
|
670
|
-
deleteUntracked: "確定要刪除未跟蹤的檔案「{name}」嗎?",
|
|
671
|
-
deleteUntrackedMany: "確定要刪除 {count} 個未跟蹤的檔案嗎?",
|
|
672
|
-
openChanges: "開啟更改",
|
|
673
|
-
openFile: "開啟檔案",
|
|
674
|
-
pull: "拉取",
|
|
675
|
-
push: "推送",
|
|
676
|
-
fetch: "抓取",
|
|
677
|
-
pullDone: "已拉取。",
|
|
678
|
-
pushDone: "已推送。",
|
|
679
|
-
fetchDone: "已抓取。",
|
|
680
|
-
moreActions: "更多操作…",
|
|
681
|
-
viewAsTree: "以樹形式檢視",
|
|
682
|
-
viewAsList: "以列表形式檢視",
|
|
683
|
-
aheadBehind: "領先 {ahead},落後 {behind}",
|
|
684
|
-
changes: "更改",
|
|
685
|
-
changeCount: "{count} 處更改",
|
|
686
|
-
previousChange: "上一個更改",
|
|
687
|
-
nextChange: "下一個更改",
|
|
688
|
-
inline: "內聯檢視",
|
|
689
|
-
sideBySide: "並排檢視",
|
|
690
|
-
closeOthers: "關閉其他",
|
|
691
|
-
closeToTheRight: "關閉下方的",
|
|
692
|
-
closeToTheLeft: "關閉左側",
|
|
693
|
-
closeTabsToTheRight: "關閉右側",
|
|
694
|
-
closeEnded: "關閉已退出的",
|
|
695
|
-
openCount: "{count} 個已開啟",
|
|
696
|
-
workbench: "工作台",
|
|
697
|
-
explorer: "資源管理器",
|
|
698
|
-
openFiles: "開啟的檔案",
|
|
699
|
-
search: "搜尋",
|
|
700
|
-
scm: "原始碼管理",
|
|
701
|
-
terminal: "終端機",
|
|
702
|
-
browser: "瀏覽器",
|
|
703
|
-
agentNavigate: "開啟網頁",
|
|
704
|
-
agentBack: "網頁後退",
|
|
705
|
-
agentForward: "網頁前進",
|
|
706
|
-
agentReload: "重新整理網頁",
|
|
707
|
-
agentSnapshot: "讀取網頁",
|
|
708
|
-
agentClick: "點選",
|
|
709
|
-
agentType: "輸入",
|
|
710
|
-
agentPress: "按鍵",
|
|
711
|
-
agentScroll: "滾動網頁",
|
|
712
|
-
agentScreenshot: "網頁截圖",
|
|
713
|
-
agentEvaluate: "在網頁裡執行",
|
|
714
|
-
agentWait: "等待網頁",
|
|
715
|
-
agentCdp: "除錯網頁",
|
|
716
|
-
refresh: "重新整理",
|
|
717
|
-
collapseAll: "全部摺疊",
|
|
718
|
-
showExcluded: "顯示預設隱藏的檔案(.git、.DS_Store 等)",
|
|
719
|
-
changeFolder: "切換目錄",
|
|
720
|
-
followConversation: "回到對話的目錄({name})",
|
|
721
|
-
loading: "載入中…",
|
|
722
|
-
empty: "空目錄",
|
|
723
|
-
noOpenFiles: "沒有開啟的檔案",
|
|
724
|
-
noOpenFilesHint: "在資源管理器、搜尋或原始碼管理中點選檔案",
|
|
725
|
-
close: "關閉",
|
|
726
|
-
closeAll: "全部關閉",
|
|
727
|
-
searchPlaceholder: "搜尋",
|
|
728
|
-
includePlaceholder: "例如 src/**/*.ts, *.md",
|
|
729
|
-
matchCase: "區分大小寫",
|
|
730
|
-
useRegex: "使用正規表示式",
|
|
731
|
-
noResults: "沒有結果。",
|
|
732
|
-
results: "{files} 個檔案中有 {count} 個結果",
|
|
733
|
-
moreResults: "結果太多,只顯示前 {count} 個。",
|
|
734
|
-
notRepository: "目前目錄不是 git 儲存庫",
|
|
735
|
-
noChanges: "沒有更改",
|
|
736
|
-
staged: "暫存的更改",
|
|
737
|
-
ahead: "領先 {count}",
|
|
738
|
-
behind: "落後 {count}",
|
|
739
|
-
newTerminal: "新建終端機",
|
|
740
|
-
noTerminals: "沒有開啟的終端機",
|
|
741
|
-
terminalEnded: "程序已退出,退出碼 {code}",
|
|
742
|
-
restartTerminal: "重新啟動",
|
|
743
|
-
killTerminal: "終止終端機",
|
|
744
|
-
clearTerminal: "清屏",
|
|
745
|
-
paste: "貼上",
|
|
746
|
-
selectAll: "全選",
|
|
747
|
-
renameTerminal: "重新命名",
|
|
748
|
-
terminalKeys: "終端機按鍵",
|
|
749
|
-
terminalAttention: "有新提醒",
|
|
750
|
-
pipeMode: "伺服器上沒有 script,終端機執行在管道上:全屏程式(vim、top)和密碼輸入不可用。",
|
|
751
|
-
address: "輸入網址或搜尋",
|
|
752
|
-
back: "後退",
|
|
753
|
-
forward: "前進",
|
|
754
|
-
openExternal: "在新視窗開啟",
|
|
755
|
-
recent: "最近存取",
|
|
756
|
-
home: "起始頁",
|
|
757
|
-
removeRecent: "從最近存取中移除",
|
|
758
|
-
frameHint: "頁面空白時,可在新視窗開啟",
|
|
759
|
-
stop: "停止",
|
|
760
|
-
openBrowser: "在預設瀏覽器中開啟",
|
|
761
|
-
loadFailed: "無法開啟這個網頁",
|
|
762
|
-
pageCrashed: "這個網頁崩潰了",
|
|
763
|
-
retry: "重試",
|
|
764
|
-
agentDriving: "Ta 正在操作",
|
|
765
|
-
importSignIns: "匯入瀏覽器登入狀態",
|
|
766
|
-
importTitle: "匯入登入狀態",
|
|
767
|
-
importHint: "把所選瀏覽器的 Cookie 複製到這裡,你和 Agent 都能直接使用已登入的網站。不匯入密碼和瀏覽記錄。",
|
|
768
|
-
importFrom: "從哪個瀏覽器匯入",
|
|
769
|
-
noProfiles: "沒有找到 Chrome、Edge、Brave、Arc、Vivaldi 或 Chromium 的個人資料。",
|
|
770
|
-
importNow: "匯入…",
|
|
771
|
-
importing: "匯入中…",
|
|
772
|
-
imported: "已匯入 {count} 個 Cookie",
|
|
773
|
-
importSkipped: "{count} 個無法讀取,已跳過。",
|
|
774
|
-
importAppBound: "{count} 個受 Chrome 應用繫結加密保護,只能在網站上重新登入。",
|
|
775
|
-
clearBrowserData: "清除內建瀏覽器資料",
|
|
776
|
-
clearBrowserDataDetail: "刪除內建瀏覽器的全部 Cookie、網站儲存和快取,網站都需要重新登入。",
|
|
777
|
-
clear: "清除",
|
|
778
|
-
cleared: "已清除內建瀏覽器資料",
|
|
779
|
-
done: "完成",
|
|
780
|
-
binary: "二進位制檔案,不顯示內容({size})。",
|
|
781
|
-
truncated: "檔案較大,只顯示前 1 MB,不能編輯。",
|
|
782
|
-
line: "第 {line} 行",
|
|
783
|
-
diffTitle: "{name}(更改)",
|
|
784
|
-
stagedTitle: "{name}(已暫存)",
|
|
785
|
-
unchanged: "內容相同。",
|
|
786
|
-
skipped: "⋯ {count} 行未更改",
|
|
787
|
-
failed: "出錯了:{message}",
|
|
788
|
-
preview: "預覽",
|
|
789
|
-
edit: "編輯",
|
|
790
|
-
save: "儲存",
|
|
791
|
-
saveFailed: "儲存失敗:{message}",
|
|
792
|
-
changedOnDisk: "檔案已在磁碟上更改。",
|
|
793
|
-
reload: "放棄我的更改"
|
|
794
|
-
};
|
|
795
|
-
var JA = {
|
|
796
|
-
newFile: "新しいファイル…",
|
|
797
|
-
newFolder: "新しいフォルダ…",
|
|
798
|
-
rename: "名前変更…",
|
|
799
|
-
delete: "削除",
|
|
800
|
-
open: "開く",
|
|
801
|
-
copyPath: "パスをコピー",
|
|
802
|
-
copyRelativePath: "相対パスをコピー",
|
|
803
|
-
copied: "コピーしました",
|
|
804
|
-
findInFolder: "フォルダ内を検索…",
|
|
805
|
-
revealInExplorer: "エクスプローラーで表示",
|
|
806
|
-
revealInFinder: "Finder で表示",
|
|
807
|
-
revealInFileExplorer: "ファイルエクスプローラーで表示",
|
|
808
|
-
openContainingFolder: "フォルダを開く",
|
|
809
|
-
revealFailed: "ファイルマネージャーで表示できませんでした:{message}",
|
|
810
|
-
uploadFiles: "ファイルをアップロード…",
|
|
811
|
-
uploadFolder: "フォルダをアップロード…",
|
|
812
|
-
download: "ダウンロード",
|
|
813
|
-
uploading: "{name} をアップロード中",
|
|
814
|
-
uploaded: "{count} 個のファイルをアップロードしました",
|
|
815
|
-
uploadFailed: "アップロードに失敗しました:{message}",
|
|
816
|
-
replaceTitle: "{names} は既に存在します。置き換えますか?",
|
|
817
|
-
replaceMessage: "同じ名前のファイルはアップロードされたファイルで上書きされます。",
|
|
818
|
-
packing: "{name} をパック中",
|
|
819
|
-
downloadFailed: "ダウンロードに失敗しました:{message}",
|
|
820
|
-
moveExists: "ターゲットフォルダに「{name}」が既に存在します。",
|
|
821
|
-
moveFailed: "移動に失敗しました:{message}",
|
|
822
|
-
nameEmpty: "ファイルまたはフォルダ名を指定してください。",
|
|
823
|
-
nameSlash: "ファイルまたはフォルダ名はスラッシュで始めることはできません。",
|
|
824
|
-
nameInvalid: "名前 {name} はファイルまたはフォルダ名として無効です。別の名前を選択してください。",
|
|
825
|
-
nameExists: "この場所に {name} というファイルまたはフォルダが既に存在します。別の名前を選択してください。",
|
|
826
|
-
nameWhitespace: "ファイルまたはフォルダ名の先頭または末尾に空白があります。",
|
|
827
|
-
deleteFile: "「{name}」を永久に削除してもよろしいですか?",
|
|
828
|
-
deleteFolder: "「{name}」とその内容を永久に削除してもよろしいですか?",
|
|
829
|
-
irreversible: "この操作は取り消せません!",
|
|
830
|
-
createFailed: "作成に失敗しました:{message}",
|
|
831
|
-
renameFailed: "名前変更に失敗しました:{message}",
|
|
832
|
-
deleteFailed: "削除に失敗しました:{message}",
|
|
833
|
-
gitM: "変更済み",
|
|
834
|
-
gitA: "追加済み",
|
|
835
|
-
gitD: "削除済み",
|
|
836
|
-
gitR: "名前変更済み",
|
|
837
|
-
gitC: "コピー済み",
|
|
838
|
-
gitU: "未追跡",
|
|
839
|
-
gitT: "タイプが変更された",
|
|
840
|
-
gitConflict: "コンフリクト",
|
|
841
|
-
matchWholeWord: "単語全体を一致",
|
|
842
|
-
toggleReplace: "置き換えを切り替え",
|
|
843
|
-
replacePlaceholder: "置き換え",
|
|
844
|
-
replace: "置き換え",
|
|
845
|
-
replaceAll: "すべて置き換え",
|
|
846
|
-
replaceAllInFile: "ファイル内をすべて置き換え",
|
|
847
|
-
replaceAllInFolder: "フォルダ内をすべて置き換え",
|
|
848
|
-
replaceAllTitle: "{files} 個のファイル中 {count} 個の一致を「{text}」に置き換えますか?",
|
|
849
|
-
cannotReplace: "{path} は大きすぎるか、テキストではないため、置き換えられません。",
|
|
850
|
-
toggleDetails: "検索詳細を切り替え",
|
|
851
|
-
filesToInclude: "含めるファイル",
|
|
852
|
-
filesToExclude: "除外するファイル",
|
|
853
|
-
excludePlaceholder: "例:*.test.ts, dist",
|
|
854
|
-
dismiss: "閉じる",
|
|
855
|
-
clearResults: "検索結果をクリア",
|
|
856
|
-
expandAll: "すべて展開",
|
|
857
|
-
copy: "コピー",
|
|
858
|
-
mergeChanges: "変更をマージ",
|
|
859
|
-
commit: "コミット",
|
|
860
|
-
commitMessage: "コミットメッセージ",
|
|
861
|
-
commitPlaceholder: "メッセージ({keys} でコミット)",
|
|
862
|
-
commitPlaceholderBranch: "メッセージ({keys} で「{branch}」にコミット)",
|
|
863
|
-
commitMessageMissing: "コミットメッセージを入力してください。",
|
|
864
|
-
nothingToCommit: "コミットする変更がありません。",
|
|
865
|
-
stageAllTitle: "ステージされた変更がありません。すべての変更をステージして直接コミットしますか?",
|
|
866
|
-
stageAllMessage: "ワーキングツリーのすべての変更(未追跡ファイルを含む)がこのコミットに追加されます。",
|
|
867
|
-
stageAllCommit: "すべてをステージしてコミット",
|
|
868
|
-
stage: "変更をステージ",
|
|
869
|
-
unstage: "ステージを取り消し",
|
|
870
|
-
discard: "変更を破棄",
|
|
871
|
-
stageAll: "すべての変更をステージ",
|
|
872
|
-
unstageAll: "すべてのステージを取り消し",
|
|
873
|
-
discardAll: "すべての変更を破棄",
|
|
874
|
-
discardOne: "「{name}」の変更を破棄してもよろしいですか?",
|
|
875
|
-
discardMany: "{count} 個のファイルの変更を破棄してもよろしいですか?",
|
|
876
|
-
deleteUntracked: "未追跡ファイル「{name}」を削除してもよろしいですか?",
|
|
877
|
-
deleteUntrackedMany: "{count} 個の未追跡ファイルを削除してもよろしいですか?",
|
|
878
|
-
openChanges: "変更を開く",
|
|
879
|
-
openFile: "ファイルを開く",
|
|
880
|
-
pull: "プル",
|
|
881
|
-
push: "プッシュ",
|
|
882
|
-
fetch: "フェッチ",
|
|
883
|
-
pullDone: "プルしました。",
|
|
884
|
-
pushDone: "プッシュしました。",
|
|
885
|
-
fetchDone: "フェッチしました。",
|
|
886
|
-
moreActions: "その他の操作…",
|
|
887
|
-
viewAsTree: "ツリー表示",
|
|
888
|
-
viewAsList: "リスト表示",
|
|
889
|
-
aheadBehind: "{ahead} 先行、{behind} 後退",
|
|
890
|
-
changes: "変更",
|
|
891
|
-
changeCount: "{count} 個の変更",
|
|
892
|
-
previousChange: "前の変更",
|
|
893
|
-
nextChange: "次の変更",
|
|
894
|
-
inline: "インライン表示",
|
|
895
|
-
sideBySide: "並行表示",
|
|
896
|
-
closeOthers: "その他を閉じる",
|
|
897
|
-
closeToTheRight: "下を閉じる",
|
|
898
|
-
closeToTheLeft: "左を閉じる",
|
|
899
|
-
closeTabsToTheRight: "右を閉じる",
|
|
900
|
-
closeEnded: "終了したものを閉じる",
|
|
901
|
-
openCount: "{count} 個開いています",
|
|
902
|
-
workbench: "ワークベンチ",
|
|
903
|
-
explorer: "エクスプローラー",
|
|
904
|
-
openFiles: "開いているファイル",
|
|
905
|
-
search: "検索",
|
|
906
|
-
scm: "ソース管理",
|
|
907
|
-
terminal: "ターミナル",
|
|
908
|
-
browser: "ブラウザ",
|
|
909
|
-
agentNavigate: "ウェブページを開く",
|
|
910
|
-
agentBack: "ウェブページを戻る",
|
|
911
|
-
agentForward: "ウェブページを進む",
|
|
912
|
-
agentReload: "ウェブページをリロード",
|
|
913
|
-
agentSnapshot: "ウェブページを読む",
|
|
914
|
-
agentClick: "クリック",
|
|
915
|
-
agentType: "入力",
|
|
916
|
-
agentPress: "キーを押す",
|
|
917
|
-
agentScroll: "ウェブページをスクロール",
|
|
918
|
-
agentScreenshot: "ウェブページのスクリーンショット",
|
|
919
|
-
agentEvaluate: "ウェブページで実行",
|
|
920
|
-
agentWait: "ウェブページを待つ",
|
|
921
|
-
agentCdp: "ウェブページをデバッグ",
|
|
922
|
-
refresh: "リロード",
|
|
923
|
-
collapseAll: "すべて折りたたむ",
|
|
924
|
-
showExcluded: "デフォルトで非表示のファイルを表示(.git、.DS_Store など)",
|
|
925
|
-
changeFolder: "ディレクトリを切り替え",
|
|
926
|
-
followConversation: "会話のディレクトリに戻る({name})",
|
|
927
|
-
loading: "読み込み中…",
|
|
928
|
-
empty: "空のディレクトリ",
|
|
929
|
-
noOpenFiles: "開いているファイルがありません",
|
|
930
|
-
noOpenFilesHint: "エクスプローラー、検索、またはソース管理でファイルをクリック",
|
|
931
|
-
close: "閉じる",
|
|
932
|
-
closeAll: "すべて閉じる",
|
|
933
|
-
searchPlaceholder: "検索",
|
|
934
|
-
includePlaceholder: "例:src/**/*.ts, *.md",
|
|
935
|
-
matchCase: "大文字小文字を区別",
|
|
936
|
-
useRegex: "正規表現を使用",
|
|
937
|
-
noResults: "結果がありません。",
|
|
938
|
-
results: "{files} 個のファイル中 {count} 個の結果",
|
|
939
|
-
moreResults: "結果が多すぎます。最初の {count} 個のみ表示されます。",
|
|
940
|
-
notRepository: "このディレクトリは git リポジトリではありません",
|
|
941
|
-
noChanges: "変更がありません",
|
|
942
|
-
staged: "ステージされた変更",
|
|
943
|
-
ahead: "{count} 先行",
|
|
944
|
-
behind: "{count} 後退",
|
|
945
|
-
newTerminal: "新しいターミナル",
|
|
946
|
-
noTerminals: "開いているターミナルがありません",
|
|
947
|
-
terminalEnded: "プロセスはコード {code} で終了しました",
|
|
948
|
-
restartTerminal: "再起動",
|
|
949
|
-
killTerminal: "ターミナルを強制終了",
|
|
950
|
-
clearTerminal: "クリア",
|
|
951
|
-
paste: "貼り付け",
|
|
952
|
-
selectAll: "すべて選択",
|
|
953
|
-
renameTerminal: "名前変更",
|
|
954
|
-
terminalKeys: "ターミナルキー",
|
|
955
|
-
terminalAttention: "新しい注意が必要です",
|
|
956
|
-
pipeMode: "サーバーに script がありません。ターミナルはパイプで実行されます。全画面プログラム(vim、top)とパスワード入力は使用できません。",
|
|
957
|
-
address: "アドレスを入力または検索",
|
|
958
|
-
back: "戻る",
|
|
959
|
-
forward: "進む",
|
|
960
|
-
openExternal: "新しいウィンドウで開く",
|
|
961
|
-
recent: "最近使用した項目",
|
|
962
|
-
home: "スタートページ",
|
|
963
|
-
removeRecent: "最近使用した項目から削除",
|
|
964
|
-
frameHint: "ページが空白ですか?新しいウィンドウで開く",
|
|
965
|
-
stop: "停止",
|
|
966
|
-
openBrowser: "デフォルトブラウザで開く",
|
|
967
|
-
loadFailed: "このウェブページを開くことができませんでした",
|
|
968
|
-
pageCrashed: "このウェブページがクラッシュしました",
|
|
969
|
-
retry: "再試行",
|
|
970
|
-
agentDriving: "Ta が操作しています",
|
|
971
|
-
importSignIns: "ブラウザからサインイン情報をインポート",
|
|
972
|
-
importTitle: "サインイン情報をインポート",
|
|
973
|
-
importHint: "選択したブラウザの Cookie をここにコピーします。あなたと Agent は、サインインしているウェブサイトを直接使用できます。パスワードと閲覧履歴はインポートされません。",
|
|
974
|
-
importFrom: "インポート元",
|
|
975
|
-
noProfiles: "Chrome、Edge、Brave、Arc、Vivaldi、または Chromium のプロフィールが見つかりません。",
|
|
976
|
-
importNow: "インポート…",
|
|
977
|
-
importing: "インポート中…",
|
|
978
|
-
imported: "{count} 個の Cookie をインポートしました",
|
|
979
|
-
importSkipped: "{count} 個は読み込めないため、スキップされました。",
|
|
980
|
-
importAppBound: "{count} 個は Chrome のアプリバウンド暗号化の対象です。これらのウェブサイトでもう一度サインインしてください。",
|
|
981
|
-
clearBrowserData: "ブラウザデータをクリア",
|
|
982
|
-
clearBrowserDataDetail: "内蔵ブラウザのすべての Cookie、ウェブサイトストレージ、キャッシュを削除します。すべてのウェブサイトで再度サインインが必要です。",
|
|
983
|
-
clear: "クリア",
|
|
984
|
-
cleared: "ブラウザデータをクリアしました",
|
|
985
|
-
done: "完了",
|
|
986
|
-
binary: "バイナリファイル。コンテンツは表示されません({size})。",
|
|
987
|
-
truncated: "大きなファイル。最初の 1 MB のみ表示され、読み取り専用です。",
|
|
988
|
-
line: "行 {line}",
|
|
989
|
-
diffTitle: "{name}(変更)",
|
|
990
|
-
stagedTitle: "{name}(ステージ済み)",
|
|
991
|
-
unchanged: "コンテンツは同じです。",
|
|
992
|
-
skipped: "⋯ {count} 行変更なし",
|
|
993
|
-
failed: "エラーが発生しました:{message}",
|
|
994
|
-
preview: "プレビュー",
|
|
995
|
-
edit: "編集",
|
|
996
|
-
save: "保存",
|
|
997
|
-
saveFailed: "保存に失敗しました:{message}",
|
|
998
|
-
changedOnDisk: "ファイルはディスク上で変更されました。",
|
|
999
|
-
reload: "変更を破棄"
|
|
1000
|
-
};
|
|
388
|
+
// web-src/i18n-en.ts
|
|
1001
389
|
var EN = {
|
|
1002
390
|
newFile: "New File…",
|
|
1003
391
|
newFolder: "New Folder…",
|
|
@@ -1174,6 +562,11 @@ var EN = {
|
|
|
1174
562
|
pageCrashed: "This page crashed",
|
|
1175
563
|
retry: "Retry",
|
|
1176
564
|
agentDriving: "Ta is working here",
|
|
565
|
+
pickElement: "Pick an element for Ta",
|
|
566
|
+
pickHint: "Click an element, Esc to cancel",
|
|
567
|
+
pickedOn: "On",
|
|
568
|
+
pickedText: "Text: ",
|
|
569
|
+
pickedAdded: "In the message box: say what to change",
|
|
1177
570
|
importSignIns: "Import sign-ins from your browser",
|
|
1178
571
|
importTitle: "Import sign-ins",
|
|
1179
572
|
importHint: "Copies the cookies of the browser you pick here, so you and the agent use the sites you are signed in to. Passwords and history are not imported.",
|
|
@@ -1204,6 +597,645 @@ var EN = {
|
|
|
1204
597
|
changedOnDisk: "The file changed on disk.",
|
|
1205
598
|
reload: "Discard my changes"
|
|
1206
599
|
};
|
|
600
|
+
|
|
601
|
+
// web-src/i18n-ja.ts
|
|
602
|
+
var JA = {
|
|
603
|
+
newFile: "新しいファイル…",
|
|
604
|
+
newFolder: "新しいフォルダ…",
|
|
605
|
+
rename: "名前変更…",
|
|
606
|
+
delete: "削除",
|
|
607
|
+
open: "開く",
|
|
608
|
+
copyPath: "パスをコピー",
|
|
609
|
+
copyRelativePath: "相対パスをコピー",
|
|
610
|
+
copied: "コピーしました",
|
|
611
|
+
findInFolder: "フォルダ内を検索…",
|
|
612
|
+
revealInExplorer: "エクスプローラーで表示",
|
|
613
|
+
revealInFinder: "Finder で表示",
|
|
614
|
+
revealInFileExplorer: "ファイルエクスプローラーで表示",
|
|
615
|
+
openContainingFolder: "フォルダを開く",
|
|
616
|
+
revealFailed: "ファイルマネージャーで表示できませんでした:{message}",
|
|
617
|
+
uploadFiles: "ファイルをアップロード…",
|
|
618
|
+
uploadFolder: "フォルダをアップロード…",
|
|
619
|
+
download: "ダウンロード",
|
|
620
|
+
uploading: "{name} をアップロード中",
|
|
621
|
+
uploaded: "{count} 個のファイルをアップロードしました",
|
|
622
|
+
uploadFailed: "アップロードに失敗しました:{message}",
|
|
623
|
+
replaceTitle: "{names} は既に存在します。置き換えますか?",
|
|
624
|
+
replaceMessage: "同じ名前のファイルはアップロードされたファイルで上書きされます。",
|
|
625
|
+
packing: "{name} をパック中",
|
|
626
|
+
downloadFailed: "ダウンロードに失敗しました:{message}",
|
|
627
|
+
moveExists: "ターゲットフォルダに「{name}」が既に存在します。",
|
|
628
|
+
moveFailed: "移動に失敗しました:{message}",
|
|
629
|
+
nameEmpty: "ファイルまたはフォルダ名を指定してください。",
|
|
630
|
+
nameSlash: "ファイルまたはフォルダ名はスラッシュで始めることはできません。",
|
|
631
|
+
nameInvalid: "名前 {name} はファイルまたはフォルダ名として無効です。別の名前を選択してください。",
|
|
632
|
+
nameExists: "この場所に {name} というファイルまたはフォルダが既に存在します。別の名前を選択してください。",
|
|
633
|
+
nameWhitespace: "ファイルまたはフォルダ名の先頭または末尾に空白があります。",
|
|
634
|
+
deleteFile: "「{name}」を永久に削除してもよろしいですか?",
|
|
635
|
+
deleteFolder: "「{name}」とその内容を永久に削除してもよろしいですか?",
|
|
636
|
+
irreversible: "この操作は取り消せません!",
|
|
637
|
+
createFailed: "作成に失敗しました:{message}",
|
|
638
|
+
renameFailed: "名前変更に失敗しました:{message}",
|
|
639
|
+
deleteFailed: "削除に失敗しました:{message}",
|
|
640
|
+
gitM: "変更済み",
|
|
641
|
+
gitA: "追加済み",
|
|
642
|
+
gitD: "削除済み",
|
|
643
|
+
gitR: "名前変更済み",
|
|
644
|
+
gitC: "コピー済み",
|
|
645
|
+
gitU: "未追跡",
|
|
646
|
+
gitT: "タイプが変更された",
|
|
647
|
+
gitConflict: "コンフリクト",
|
|
648
|
+
matchWholeWord: "単語全体を一致",
|
|
649
|
+
toggleReplace: "置き換えを切り替え",
|
|
650
|
+
replacePlaceholder: "置き換え",
|
|
651
|
+
replace: "置き換え",
|
|
652
|
+
replaceAll: "すべて置き換え",
|
|
653
|
+
replaceAllInFile: "ファイル内をすべて置き換え",
|
|
654
|
+
replaceAllInFolder: "フォルダ内をすべて置き換え",
|
|
655
|
+
replaceAllTitle: "{files} 個のファイル中 {count} 個の一致を「{text}」に置き換えますか?",
|
|
656
|
+
cannotReplace: "{path} は大きすぎるか、テキストではないため、置き換えられません。",
|
|
657
|
+
toggleDetails: "検索詳細を切り替え",
|
|
658
|
+
filesToInclude: "含めるファイル",
|
|
659
|
+
filesToExclude: "除外するファイル",
|
|
660
|
+
excludePlaceholder: "例:*.test.ts, dist",
|
|
661
|
+
dismiss: "閉じる",
|
|
662
|
+
clearResults: "検索結果をクリア",
|
|
663
|
+
expandAll: "すべて展開",
|
|
664
|
+
copy: "コピー",
|
|
665
|
+
mergeChanges: "変更をマージ",
|
|
666
|
+
commit: "コミット",
|
|
667
|
+
commitMessage: "コミットメッセージ",
|
|
668
|
+
commitPlaceholder: "メッセージ({keys} でコミット)",
|
|
669
|
+
commitPlaceholderBranch: "メッセージ({keys} で「{branch}」にコミット)",
|
|
670
|
+
commitMessageMissing: "コミットメッセージを入力してください。",
|
|
671
|
+
nothingToCommit: "コミットする変更がありません。",
|
|
672
|
+
stageAllTitle: "ステージされた変更がありません。すべての変更をステージして直接コミットしますか?",
|
|
673
|
+
stageAllMessage: "ワーキングツリーのすべての変更(未追跡ファイルを含む)がこのコミットに追加されます。",
|
|
674
|
+
stageAllCommit: "すべてをステージしてコミット",
|
|
675
|
+
stage: "変更をステージ",
|
|
676
|
+
unstage: "ステージを取り消し",
|
|
677
|
+
discard: "変更を破棄",
|
|
678
|
+
stageAll: "すべての変更をステージ",
|
|
679
|
+
unstageAll: "すべてのステージを取り消し",
|
|
680
|
+
discardAll: "すべての変更を破棄",
|
|
681
|
+
discardOne: "「{name}」の変更を破棄してもよろしいですか?",
|
|
682
|
+
discardMany: "{count} 個のファイルの変更を破棄してもよろしいですか?",
|
|
683
|
+
deleteUntracked: "未追跡ファイル「{name}」を削除してもよろしいですか?",
|
|
684
|
+
deleteUntrackedMany: "{count} 個の未追跡ファイルを削除してもよろしいですか?",
|
|
685
|
+
openChanges: "変更を開く",
|
|
686
|
+
openFile: "ファイルを開く",
|
|
687
|
+
pull: "プル",
|
|
688
|
+
push: "プッシュ",
|
|
689
|
+
fetch: "フェッチ",
|
|
690
|
+
pullDone: "プルしました。",
|
|
691
|
+
pushDone: "プッシュしました。",
|
|
692
|
+
fetchDone: "フェッチしました。",
|
|
693
|
+
moreActions: "その他の操作…",
|
|
694
|
+
viewAsTree: "ツリー表示",
|
|
695
|
+
viewAsList: "リスト表示",
|
|
696
|
+
aheadBehind: "{ahead} 先行、{behind} 後退",
|
|
697
|
+
changes: "変更",
|
|
698
|
+
changeCount: "{count} 個の変更",
|
|
699
|
+
previousChange: "前の変更",
|
|
700
|
+
nextChange: "次の変更",
|
|
701
|
+
inline: "インライン表示",
|
|
702
|
+
sideBySide: "並行表示",
|
|
703
|
+
closeOthers: "その他を閉じる",
|
|
704
|
+
closeToTheRight: "下を閉じる",
|
|
705
|
+
closeToTheLeft: "左を閉じる",
|
|
706
|
+
closeTabsToTheRight: "右を閉じる",
|
|
707
|
+
closeEnded: "終了したものを閉じる",
|
|
708
|
+
openCount: "{count} 個開いています",
|
|
709
|
+
workbench: "ワークベンチ",
|
|
710
|
+
explorer: "エクスプローラー",
|
|
711
|
+
openFiles: "開いているファイル",
|
|
712
|
+
search: "検索",
|
|
713
|
+
scm: "ソース管理",
|
|
714
|
+
terminal: "ターミナル",
|
|
715
|
+
browser: "ブラウザ",
|
|
716
|
+
agentNavigate: "ウェブページを開く",
|
|
717
|
+
agentBack: "ウェブページを戻る",
|
|
718
|
+
agentForward: "ウェブページを進む",
|
|
719
|
+
agentReload: "ウェブページをリロード",
|
|
720
|
+
agentSnapshot: "ウェブページを読む",
|
|
721
|
+
agentClick: "クリック",
|
|
722
|
+
agentType: "入力",
|
|
723
|
+
agentPress: "キーを押す",
|
|
724
|
+
agentScroll: "ウェブページをスクロール",
|
|
725
|
+
agentScreenshot: "ウェブページのスクリーンショット",
|
|
726
|
+
agentEvaluate: "ウェブページで実行",
|
|
727
|
+
agentWait: "ウェブページを待つ",
|
|
728
|
+
agentCdp: "ウェブページをデバッグ",
|
|
729
|
+
refresh: "リロード",
|
|
730
|
+
collapseAll: "すべて折りたたむ",
|
|
731
|
+
showExcluded: "デフォルトで非表示のファイルを表示(.git、.DS_Store など)",
|
|
732
|
+
changeFolder: "ディレクトリを切り替え",
|
|
733
|
+
followConversation: "会話のディレクトリに戻る({name})",
|
|
734
|
+
loading: "読み込み中…",
|
|
735
|
+
empty: "空のディレクトリ",
|
|
736
|
+
noOpenFiles: "開いているファイルがありません",
|
|
737
|
+
noOpenFilesHint: "エクスプローラー、検索、またはソース管理でファイルをクリック",
|
|
738
|
+
close: "閉じる",
|
|
739
|
+
closeAll: "すべて閉じる",
|
|
740
|
+
searchPlaceholder: "検索",
|
|
741
|
+
includePlaceholder: "例:src/**/*.ts, *.md",
|
|
742
|
+
matchCase: "大文字小文字を区別",
|
|
743
|
+
useRegex: "正規表現を使用",
|
|
744
|
+
noResults: "結果がありません。",
|
|
745
|
+
results: "{files} 個のファイル中 {count} 個の結果",
|
|
746
|
+
moreResults: "結果が多すぎます。最初の {count} 個のみ表示されます。",
|
|
747
|
+
notRepository: "このディレクトリは git リポジトリではありません",
|
|
748
|
+
noChanges: "変更がありません",
|
|
749
|
+
staged: "ステージされた変更",
|
|
750
|
+
ahead: "{count} 先行",
|
|
751
|
+
behind: "{count} 後退",
|
|
752
|
+
newTerminal: "新しいターミナル",
|
|
753
|
+
noTerminals: "開いているターミナルがありません",
|
|
754
|
+
terminalEnded: "プロセスはコード {code} で終了しました",
|
|
755
|
+
restartTerminal: "再起動",
|
|
756
|
+
killTerminal: "ターミナルを強制終了",
|
|
757
|
+
clearTerminal: "クリア",
|
|
758
|
+
paste: "貼り付け",
|
|
759
|
+
selectAll: "すべて選択",
|
|
760
|
+
renameTerminal: "名前変更",
|
|
761
|
+
terminalKeys: "ターミナルキー",
|
|
762
|
+
terminalAttention: "新しい注意が必要です",
|
|
763
|
+
pipeMode: "サーバーに script がありません。ターミナルはパイプで実行されます。全画面プログラム(vim、top)とパスワード入力は使用できません。",
|
|
764
|
+
address: "アドレスを入力または検索",
|
|
765
|
+
back: "戻る",
|
|
766
|
+
forward: "進む",
|
|
767
|
+
openExternal: "新しいウィンドウで開く",
|
|
768
|
+
recent: "最近使用した項目",
|
|
769
|
+
home: "スタートページ",
|
|
770
|
+
removeRecent: "最近使用した項目から削除",
|
|
771
|
+
frameHint: "ページが空白ですか?新しいウィンドウで開く",
|
|
772
|
+
stop: "停止",
|
|
773
|
+
openBrowser: "デフォルトブラウザで開く",
|
|
774
|
+
loadFailed: "このウェブページを開くことができませんでした",
|
|
775
|
+
pageCrashed: "このウェブページがクラッシュしました",
|
|
776
|
+
retry: "再試行",
|
|
777
|
+
agentDriving: "Ta が操作しています",
|
|
778
|
+
pickElement: "要素を選んで Ta に送る",
|
|
779
|
+
pickHint: "要素をクリック、Esc でキャンセル",
|
|
780
|
+
pickedOn: "ページ",
|
|
781
|
+
pickedText: "テキスト:",
|
|
782
|
+
pickedAdded: "入力欄に入れました。どう変えたいか書いてください",
|
|
783
|
+
importSignIns: "ブラウザからサインイン情報をインポート",
|
|
784
|
+
importTitle: "サインイン情報をインポート",
|
|
785
|
+
importHint: "選択したブラウザの Cookie をここにコピーします。あなたと Agent は、サインインしているウェブサイトを直接使用できます。パスワードと閲覧履歴はインポートされません。",
|
|
786
|
+
importFrom: "インポート元",
|
|
787
|
+
noProfiles: "Chrome、Edge、Brave、Arc、Vivaldi、または Chromium のプロフィールが見つかりません。",
|
|
788
|
+
importNow: "インポート…",
|
|
789
|
+
importing: "インポート中…",
|
|
790
|
+
imported: "{count} 個の Cookie をインポートしました",
|
|
791
|
+
importSkipped: "{count} 個は読み込めないため、スキップされました。",
|
|
792
|
+
importAppBound: "{count} 個は Chrome のアプリバウンド暗号化の対象です。これらのウェブサイトでもう一度サインインしてください。",
|
|
793
|
+
clearBrowserData: "ブラウザデータをクリア",
|
|
794
|
+
clearBrowserDataDetail: "内蔵ブラウザのすべての Cookie、ウェブサイトストレージ、キャッシュを削除します。すべてのウェブサイトで再度サインインが必要です。",
|
|
795
|
+
clear: "クリア",
|
|
796
|
+
cleared: "ブラウザデータをクリアしました",
|
|
797
|
+
done: "完了",
|
|
798
|
+
binary: "バイナリファイル。コンテンツは表示されません({size})。",
|
|
799
|
+
truncated: "大きなファイル。最初の 1 MB のみ表示され、読み取り専用です。",
|
|
800
|
+
line: "行 {line}",
|
|
801
|
+
diffTitle: "{name}(変更)",
|
|
802
|
+
stagedTitle: "{name}(ステージ済み)",
|
|
803
|
+
unchanged: "コンテンツは同じです。",
|
|
804
|
+
skipped: "⋯ {count} 行変更なし",
|
|
805
|
+
failed: "エラーが発生しました:{message}",
|
|
806
|
+
preview: "プレビュー",
|
|
807
|
+
edit: "編集",
|
|
808
|
+
save: "保存",
|
|
809
|
+
saveFailed: "保存に失敗しました:{message}",
|
|
810
|
+
changedOnDisk: "ファイルはディスク上で変更されました。",
|
|
811
|
+
reload: "変更を破棄"
|
|
812
|
+
};
|
|
813
|
+
|
|
814
|
+
// web-src/i18n-zh-tw.ts
|
|
815
|
+
var ZH_TW = {
|
|
816
|
+
newFile: "新建檔案…",
|
|
817
|
+
newFolder: "新建資料夾…",
|
|
818
|
+
rename: "重新命名…",
|
|
819
|
+
delete: "刪除",
|
|
820
|
+
open: "開啟",
|
|
821
|
+
copyPath: "複製路徑",
|
|
822
|
+
copyRelativePath: "複製相對路徑",
|
|
823
|
+
copied: "已複製",
|
|
824
|
+
findInFolder: "在資料夾中查詢…",
|
|
825
|
+
revealInExplorer: "在資源管理器中顯示",
|
|
826
|
+
revealInFinder: "在 Finder 中顯示",
|
|
827
|
+
revealInFileExplorer: "在檔案資源管理器中顯示",
|
|
828
|
+
openContainingFolder: "開啟所在的資料夾",
|
|
829
|
+
revealFailed: "無法在檔案管理器中顯示:{message}",
|
|
830
|
+
uploadFiles: "上傳檔案…",
|
|
831
|
+
uploadFolder: "上傳資料夾…",
|
|
832
|
+
download: "下載",
|
|
833
|
+
uploading: "正在上傳 {name}",
|
|
834
|
+
uploaded: "已上傳 {count} 個檔案",
|
|
835
|
+
uploadFailed: "上傳失敗:{message}",
|
|
836
|
+
replaceTitle: "已存在 {names},要替換嗎?",
|
|
837
|
+
replaceMessage: "同名的檔案會被上傳的檔案覆蓋。",
|
|
838
|
+
packing: "正在打包 {name}",
|
|
839
|
+
downloadFailed: "下載失敗:{message}",
|
|
840
|
+
moveExists: "目標資料夾中已有「{name}」。",
|
|
841
|
+
moveFailed: "移動失敗:{message}",
|
|
842
|
+
nameEmpty: "必須提供檔案或資料夾名稱。",
|
|
843
|
+
nameSlash: "檔案或資料夾名稱不能以斜槓開頭。",
|
|
844
|
+
nameInvalid: "名稱 {name} 不能用作檔案或資料夾名稱,請換一個。",
|
|
845
|
+
nameExists: "此位置已存在檔案或資料夾 {name},請換一個名稱。",
|
|
846
|
+
nameWhitespace: "檔案或資料夾名稱的開頭或結尾有空格。",
|
|
847
|
+
deleteFile: "確定要永久刪除「{name}」嗎?",
|
|
848
|
+
deleteFolder: "確定要永久刪除「{name}」及其內容嗎?",
|
|
849
|
+
irreversible: "此操作不可撤銷!",
|
|
850
|
+
createFailed: "建立失敗:{message}",
|
|
851
|
+
renameFailed: "重新命名失敗:{message}",
|
|
852
|
+
deleteFailed: "刪除失敗:{message}",
|
|
853
|
+
gitM: "已修改",
|
|
854
|
+
gitA: "已新增",
|
|
855
|
+
gitD: "已刪除",
|
|
856
|
+
gitR: "已重新命名",
|
|
857
|
+
gitC: "已複製",
|
|
858
|
+
gitU: "未跟蹤",
|
|
859
|
+
gitT: "型別已更改",
|
|
860
|
+
gitConflict: "衝突",
|
|
861
|
+
matchWholeWord: "全字匹配",
|
|
862
|
+
toggleReplace: "切換替換",
|
|
863
|
+
replacePlaceholder: "替換",
|
|
864
|
+
replace: "替換",
|
|
865
|
+
replaceAll: "全部替換",
|
|
866
|
+
replaceAllInFile: "在此檔案中全部替換",
|
|
867
|
+
replaceAllInFolder: "在此資料夾中全部替換",
|
|
868
|
+
replaceAllTitle: "將 {files} 個檔案中的 {count} 處匹配替換為「{text}」?",
|
|
869
|
+
cannotReplace: "{path} 太大或不是文本,不能替換。",
|
|
870
|
+
toggleDetails: "切換搜尋詳細資訊",
|
|
871
|
+
filesToInclude: "包含的檔案",
|
|
872
|
+
filesToExclude: "排除的檔案",
|
|
873
|
+
excludePlaceholder: "例如 *.test.ts, dist",
|
|
874
|
+
dismiss: "關閉",
|
|
875
|
+
clearResults: "清除搜尋結果",
|
|
876
|
+
expandAll: "全部展開",
|
|
877
|
+
copy: "複製",
|
|
878
|
+
mergeChanges: "合併更改",
|
|
879
|
+
commit: "提交",
|
|
880
|
+
commitMessage: "提交資訊",
|
|
881
|
+
commitPlaceholder: "訊息(按 {keys} 提交)",
|
|
882
|
+
commitPlaceholderBranch: "訊息(按 {keys} 在「{branch}」提交)",
|
|
883
|
+
commitMessageMissing: "請先寫提交資訊。",
|
|
884
|
+
nothingToCommit: "沒有可提交的更改。",
|
|
885
|
+
stageAllTitle: "沒有暫存的更改。要暫存全部更改並直接提交嗎?",
|
|
886
|
+
stageAllMessage: "會把工作區裡所有更改(包括未跟蹤的檔案)加入這次提交。",
|
|
887
|
+
stageAllCommit: "暫存全部並提交",
|
|
888
|
+
stage: "暫存更改",
|
|
889
|
+
unstage: "取消暫存更改",
|
|
890
|
+
discard: "放棄更改",
|
|
891
|
+
stageAll: "暫存所有更改",
|
|
892
|
+
unstageAll: "取消暫存所有更改",
|
|
893
|
+
discardAll: "放棄所有更改",
|
|
894
|
+
discardOne: "確定要放棄「{name}」中的更改嗎?",
|
|
895
|
+
discardMany: "確定要放棄 {count} 個檔案中的更改嗎?",
|
|
896
|
+
deleteUntracked: "確定要刪除未跟蹤的檔案「{name}」嗎?",
|
|
897
|
+
deleteUntrackedMany: "確定要刪除 {count} 個未跟蹤的檔案嗎?",
|
|
898
|
+
openChanges: "開啟更改",
|
|
899
|
+
openFile: "開啟檔案",
|
|
900
|
+
pull: "拉取",
|
|
901
|
+
push: "推送",
|
|
902
|
+
fetch: "抓取",
|
|
903
|
+
pullDone: "已拉取。",
|
|
904
|
+
pushDone: "已推送。",
|
|
905
|
+
fetchDone: "已抓取。",
|
|
906
|
+
moreActions: "更多操作…",
|
|
907
|
+
viewAsTree: "以樹形式檢視",
|
|
908
|
+
viewAsList: "以列表形式檢視",
|
|
909
|
+
aheadBehind: "領先 {ahead},落後 {behind}",
|
|
910
|
+
changes: "更改",
|
|
911
|
+
changeCount: "{count} 處更改",
|
|
912
|
+
previousChange: "上一個更改",
|
|
913
|
+
nextChange: "下一個更改",
|
|
914
|
+
inline: "內聯檢視",
|
|
915
|
+
sideBySide: "並排檢視",
|
|
916
|
+
closeOthers: "關閉其他",
|
|
917
|
+
closeToTheRight: "關閉下方的",
|
|
918
|
+
closeToTheLeft: "關閉左側",
|
|
919
|
+
closeTabsToTheRight: "關閉右側",
|
|
920
|
+
closeEnded: "關閉已退出的",
|
|
921
|
+
openCount: "{count} 個已開啟",
|
|
922
|
+
workbench: "工作台",
|
|
923
|
+
explorer: "資源管理器",
|
|
924
|
+
openFiles: "開啟的檔案",
|
|
925
|
+
search: "搜尋",
|
|
926
|
+
scm: "原始碼管理",
|
|
927
|
+
terminal: "終端機",
|
|
928
|
+
browser: "瀏覽器",
|
|
929
|
+
agentNavigate: "開啟網頁",
|
|
930
|
+
agentBack: "網頁後退",
|
|
931
|
+
agentForward: "網頁前進",
|
|
932
|
+
agentReload: "重新整理網頁",
|
|
933
|
+
agentSnapshot: "讀取網頁",
|
|
934
|
+
agentClick: "點選",
|
|
935
|
+
agentType: "輸入",
|
|
936
|
+
agentPress: "按鍵",
|
|
937
|
+
agentScroll: "滾動網頁",
|
|
938
|
+
agentScreenshot: "網頁截圖",
|
|
939
|
+
agentEvaluate: "在網頁裡執行",
|
|
940
|
+
agentWait: "等待網頁",
|
|
941
|
+
agentCdp: "除錯網頁",
|
|
942
|
+
refresh: "重新整理",
|
|
943
|
+
collapseAll: "全部摺疊",
|
|
944
|
+
showExcluded: "顯示預設隱藏的檔案(.git、.DS_Store 等)",
|
|
945
|
+
changeFolder: "切換目錄",
|
|
946
|
+
followConversation: "回到對話的目錄({name})",
|
|
947
|
+
loading: "載入中…",
|
|
948
|
+
empty: "空目錄",
|
|
949
|
+
noOpenFiles: "沒有開啟的檔案",
|
|
950
|
+
noOpenFilesHint: "在資源管理器、搜尋或原始碼管理中點選檔案",
|
|
951
|
+
close: "關閉",
|
|
952
|
+
closeAll: "全部關閉",
|
|
953
|
+
searchPlaceholder: "搜尋",
|
|
954
|
+
includePlaceholder: "例如 src/**/*.ts, *.md",
|
|
955
|
+
matchCase: "區分大小寫",
|
|
956
|
+
useRegex: "使用正規表示式",
|
|
957
|
+
noResults: "沒有結果。",
|
|
958
|
+
results: "{files} 個檔案中有 {count} 個結果",
|
|
959
|
+
moreResults: "結果太多,只顯示前 {count} 個。",
|
|
960
|
+
notRepository: "目前目錄不是 git 儲存庫",
|
|
961
|
+
noChanges: "沒有更改",
|
|
962
|
+
staged: "暫存的更改",
|
|
963
|
+
ahead: "領先 {count}",
|
|
964
|
+
behind: "落後 {count}",
|
|
965
|
+
newTerminal: "新建終端機",
|
|
966
|
+
noTerminals: "沒有開啟的終端機",
|
|
967
|
+
terminalEnded: "程序已退出,退出碼 {code}",
|
|
968
|
+
restartTerminal: "重新啟動",
|
|
969
|
+
killTerminal: "終止終端機",
|
|
970
|
+
clearTerminal: "清屏",
|
|
971
|
+
paste: "貼上",
|
|
972
|
+
selectAll: "全選",
|
|
973
|
+
renameTerminal: "重新命名",
|
|
974
|
+
terminalKeys: "終端機按鍵",
|
|
975
|
+
terminalAttention: "有新提醒",
|
|
976
|
+
pipeMode: "伺服器上沒有 script,終端機執行在管道上:全屏程式(vim、top)和密碼輸入不可用。",
|
|
977
|
+
address: "輸入網址或搜尋",
|
|
978
|
+
back: "後退",
|
|
979
|
+
forward: "前進",
|
|
980
|
+
openExternal: "在新視窗開啟",
|
|
981
|
+
recent: "最近存取",
|
|
982
|
+
home: "起始頁",
|
|
983
|
+
removeRecent: "從最近存取中移除",
|
|
984
|
+
frameHint: "頁面空白時,可在新視窗開啟",
|
|
985
|
+
stop: "停止",
|
|
986
|
+
openBrowser: "在預設瀏覽器中開啟",
|
|
987
|
+
loadFailed: "無法開啟這個網頁",
|
|
988
|
+
pageCrashed: "這個網頁崩潰了",
|
|
989
|
+
retry: "重試",
|
|
990
|
+
agentDriving: "Ta 正在操作",
|
|
991
|
+
pickElement: "選取元素,傳給 Ta",
|
|
992
|
+
pickHint: "點一個元素,Esc 取消",
|
|
993
|
+
pickedOn: "網頁",
|
|
994
|
+
pickedText: "文字:",
|
|
995
|
+
pickedAdded: "已放進輸入框,說說想怎麼改",
|
|
996
|
+
importSignIns: "匯入瀏覽器登入狀態",
|
|
997
|
+
importTitle: "匯入登入狀態",
|
|
998
|
+
importHint: "把所選瀏覽器的 Cookie 複製到這裡,你和 Agent 都能直接使用已登入的網站。不匯入密碼和瀏覽記錄。",
|
|
999
|
+
importFrom: "從哪個瀏覽器匯入",
|
|
1000
|
+
noProfiles: "沒有找到 Chrome、Edge、Brave、Arc、Vivaldi 或 Chromium 的個人資料。",
|
|
1001
|
+
importNow: "匯入…",
|
|
1002
|
+
importing: "匯入中…",
|
|
1003
|
+
imported: "已匯入 {count} 個 Cookie",
|
|
1004
|
+
importSkipped: "{count} 個無法讀取,已跳過。",
|
|
1005
|
+
importAppBound: "{count} 個受 Chrome 應用繫結加密保護,只能在網站上重新登入。",
|
|
1006
|
+
clearBrowserData: "清除內建瀏覽器資料",
|
|
1007
|
+
clearBrowserDataDetail: "刪除內建瀏覽器的全部 Cookie、網站儲存和快取,網站都需要重新登入。",
|
|
1008
|
+
clear: "清除",
|
|
1009
|
+
cleared: "已清除內建瀏覽器資料",
|
|
1010
|
+
done: "完成",
|
|
1011
|
+
binary: "二進位制檔案,不顯示內容({size})。",
|
|
1012
|
+
truncated: "檔案較大,只顯示前 1 MB,不能編輯。",
|
|
1013
|
+
line: "第 {line} 行",
|
|
1014
|
+
diffTitle: "{name}(更改)",
|
|
1015
|
+
stagedTitle: "{name}(已暫存)",
|
|
1016
|
+
unchanged: "內容相同。",
|
|
1017
|
+
skipped: "⋯ {count} 行未更改",
|
|
1018
|
+
failed: "出錯了:{message}",
|
|
1019
|
+
preview: "預覽",
|
|
1020
|
+
edit: "編輯",
|
|
1021
|
+
save: "儲存",
|
|
1022
|
+
saveFailed: "儲存失敗:{message}",
|
|
1023
|
+
changedOnDisk: "檔案已在磁碟上更改。",
|
|
1024
|
+
reload: "放棄我的更改"
|
|
1025
|
+
};
|
|
1026
|
+
|
|
1027
|
+
// web-src/i18n.ts
|
|
1028
|
+
var ZH = {
|
|
1029
|
+
newFile: "新建文件…",
|
|
1030
|
+
newFolder: "新建文件夹…",
|
|
1031
|
+
rename: "重命名…",
|
|
1032
|
+
delete: "删除",
|
|
1033
|
+
open: "打开",
|
|
1034
|
+
copyPath: "复制路径",
|
|
1035
|
+
copyRelativePath: "复制相对路径",
|
|
1036
|
+
copied: "已复制",
|
|
1037
|
+
findInFolder: "在文件夹中查找…",
|
|
1038
|
+
revealInExplorer: "在资源管理器中显示",
|
|
1039
|
+
revealInFinder: "在 Finder 中显示",
|
|
1040
|
+
revealInFileExplorer: "在文件资源管理器中显示",
|
|
1041
|
+
openContainingFolder: "打开所在的文件夹",
|
|
1042
|
+
revealFailed: "无法在文件管理器中显示:{message}",
|
|
1043
|
+
uploadFiles: "上传文件…",
|
|
1044
|
+
uploadFolder: "上传文件夹…",
|
|
1045
|
+
download: "下载",
|
|
1046
|
+
uploading: "正在上传 {name}",
|
|
1047
|
+
uploaded: "已上传 {count} 个文件",
|
|
1048
|
+
uploadFailed: "上传失败:{message}",
|
|
1049
|
+
replaceTitle: "已存在 {names},要替换吗?",
|
|
1050
|
+
replaceMessage: "同名的文件会被上传的文件覆盖。",
|
|
1051
|
+
packing: "正在打包 {name}",
|
|
1052
|
+
downloadFailed: "下载失败:{message}",
|
|
1053
|
+
moveExists: "目标文件夹中已有“{name}”。",
|
|
1054
|
+
moveFailed: "移动失败:{message}",
|
|
1055
|
+
nameEmpty: "必须提供文件或文件夹名称。",
|
|
1056
|
+
nameSlash: "文件或文件夹名称不能以斜杠开头。",
|
|
1057
|
+
nameInvalid: "名称 {name} 不能用作文件或文件夹名称,请换一个。",
|
|
1058
|
+
nameExists: "此位置已存在文件或文件夹 {name},请换一个名称。",
|
|
1059
|
+
nameWhitespace: "文件或文件夹名称的开头或结尾有空格。",
|
|
1060
|
+
deleteFile: "确定要永久删除“{name}”吗?",
|
|
1061
|
+
deleteFolder: "确定要永久删除“{name}”及其内容吗?",
|
|
1062
|
+
irreversible: "此操作不可撤销!",
|
|
1063
|
+
createFailed: "创建失败:{message}",
|
|
1064
|
+
renameFailed: "重命名失败:{message}",
|
|
1065
|
+
deleteFailed: "删除失败:{message}",
|
|
1066
|
+
gitM: "已修改",
|
|
1067
|
+
gitA: "已添加",
|
|
1068
|
+
gitD: "已删除",
|
|
1069
|
+
gitR: "已重命名",
|
|
1070
|
+
gitC: "已复制",
|
|
1071
|
+
gitU: "未跟踪",
|
|
1072
|
+
gitT: "类型已更改",
|
|
1073
|
+
gitConflict: "冲突",
|
|
1074
|
+
matchWholeWord: "全字匹配",
|
|
1075
|
+
toggleReplace: "切换替换",
|
|
1076
|
+
replacePlaceholder: "替换",
|
|
1077
|
+
replace: "替换",
|
|
1078
|
+
replaceAll: "全部替换",
|
|
1079
|
+
replaceAllInFile: "在此文件中全部替换",
|
|
1080
|
+
replaceAllInFolder: "在此文件夹中全部替换",
|
|
1081
|
+
replaceAllTitle: "将 {files} 个文件中的 {count} 处匹配替换为“{text}”?",
|
|
1082
|
+
cannotReplace: "{path} 太大或不是文本,不能替换。",
|
|
1083
|
+
toggleDetails: "切换搜索详细信息",
|
|
1084
|
+
filesToInclude: "包含的文件",
|
|
1085
|
+
filesToExclude: "排除的文件",
|
|
1086
|
+
excludePlaceholder: "例如 *.test.ts, dist",
|
|
1087
|
+
dismiss: "关闭",
|
|
1088
|
+
clearResults: "清除搜索结果",
|
|
1089
|
+
expandAll: "全部展开",
|
|
1090
|
+
copy: "复制",
|
|
1091
|
+
mergeChanges: "合并更改",
|
|
1092
|
+
commit: "提交",
|
|
1093
|
+
commitMessage: "提交信息",
|
|
1094
|
+
commitPlaceholder: "消息(按 {keys} 提交)",
|
|
1095
|
+
commitPlaceholderBranch: "消息(按 {keys} 在“{branch}”提交)",
|
|
1096
|
+
commitMessageMissing: "请先写提交信息。",
|
|
1097
|
+
nothingToCommit: "没有可提交的更改。",
|
|
1098
|
+
stageAllTitle: "没有暂存的更改。要暂存全部更改并直接提交吗?",
|
|
1099
|
+
stageAllMessage: "会把工作区里所有更改(包括未跟踪的文件)加入这次提交。",
|
|
1100
|
+
stageAllCommit: "暂存全部并提交",
|
|
1101
|
+
stage: "暂存更改",
|
|
1102
|
+
unstage: "取消暂存更改",
|
|
1103
|
+
discard: "放弃更改",
|
|
1104
|
+
stageAll: "暂存所有更改",
|
|
1105
|
+
unstageAll: "取消暂存所有更改",
|
|
1106
|
+
discardAll: "放弃所有更改",
|
|
1107
|
+
discardOne: "确定要放弃“{name}”中的更改吗?",
|
|
1108
|
+
discardMany: "确定要放弃 {count} 个文件中的更改吗?",
|
|
1109
|
+
deleteUntracked: "确定要删除未跟踪的文件“{name}”吗?",
|
|
1110
|
+
deleteUntrackedMany: "确定要删除 {count} 个未跟踪的文件吗?",
|
|
1111
|
+
openChanges: "打开更改",
|
|
1112
|
+
openFile: "打开文件",
|
|
1113
|
+
pull: "拉取",
|
|
1114
|
+
push: "推送",
|
|
1115
|
+
fetch: "抓取",
|
|
1116
|
+
pullDone: "已拉取。",
|
|
1117
|
+
pushDone: "已推送。",
|
|
1118
|
+
fetchDone: "已抓取。",
|
|
1119
|
+
moreActions: "更多操作…",
|
|
1120
|
+
viewAsTree: "以树形式查看",
|
|
1121
|
+
viewAsList: "以列表形式查看",
|
|
1122
|
+
aheadBehind: "领先 {ahead},落后 {behind}",
|
|
1123
|
+
changes: "更改",
|
|
1124
|
+
changeCount: "{count} 处更改",
|
|
1125
|
+
previousChange: "上一个更改",
|
|
1126
|
+
nextChange: "下一个更改",
|
|
1127
|
+
inline: "内联视图",
|
|
1128
|
+
sideBySide: "并排视图",
|
|
1129
|
+
closeOthers: "关闭其他",
|
|
1130
|
+
closeToTheRight: "关闭下方的",
|
|
1131
|
+
closeToTheLeft: "关闭左侧",
|
|
1132
|
+
closeTabsToTheRight: "关闭右侧",
|
|
1133
|
+
closeEnded: "关闭已退出的",
|
|
1134
|
+
openCount: "{count} 个已打开",
|
|
1135
|
+
workbench: "工作台",
|
|
1136
|
+
explorer: "资源管理器",
|
|
1137
|
+
openFiles: "打开的文件",
|
|
1138
|
+
search: "搜索",
|
|
1139
|
+
scm: "源代码管理",
|
|
1140
|
+
terminal: "终端",
|
|
1141
|
+
browser: "浏览器",
|
|
1142
|
+
agentNavigate: "打开网页",
|
|
1143
|
+
agentBack: "网页后退",
|
|
1144
|
+
agentForward: "网页前进",
|
|
1145
|
+
agentReload: "刷新网页",
|
|
1146
|
+
agentSnapshot: "读取网页",
|
|
1147
|
+
agentClick: "点击",
|
|
1148
|
+
agentType: "输入",
|
|
1149
|
+
agentPress: "按键",
|
|
1150
|
+
agentScroll: "滚动网页",
|
|
1151
|
+
agentScreenshot: "网页截图",
|
|
1152
|
+
agentEvaluate: "在网页里运行",
|
|
1153
|
+
agentWait: "等待网页",
|
|
1154
|
+
agentCdp: "调试网页",
|
|
1155
|
+
refresh: "刷新",
|
|
1156
|
+
collapseAll: "全部折叠",
|
|
1157
|
+
showExcluded: "显示默认隐藏的文件(.git、.DS_Store 等)",
|
|
1158
|
+
changeFolder: "切换目录",
|
|
1159
|
+
followConversation: "回到对话的目录({name})",
|
|
1160
|
+
loading: "加载中…",
|
|
1161
|
+
empty: "空目录",
|
|
1162
|
+
noOpenFiles: "没有打开的文件",
|
|
1163
|
+
noOpenFilesHint: "在资源管理器、搜索或源代码管理中点击文件",
|
|
1164
|
+
close: "关闭",
|
|
1165
|
+
closeAll: "全部关闭",
|
|
1166
|
+
searchPlaceholder: "搜索",
|
|
1167
|
+
includePlaceholder: "例如 src/**/*.ts, *.md",
|
|
1168
|
+
matchCase: "区分大小写",
|
|
1169
|
+
useRegex: "使用正则表达式",
|
|
1170
|
+
noResults: "没有结果。",
|
|
1171
|
+
results: "{files} 个文件中有 {count} 个结果",
|
|
1172
|
+
moreResults: "结果太多,只显示前 {count} 个。",
|
|
1173
|
+
notRepository: "当前目录不是 git 仓库",
|
|
1174
|
+
noChanges: "没有更改",
|
|
1175
|
+
staged: "暂存的更改",
|
|
1176
|
+
ahead: "领先 {count}",
|
|
1177
|
+
behind: "落后 {count}",
|
|
1178
|
+
newTerminal: "新建终端",
|
|
1179
|
+
noTerminals: "没有打开的终端",
|
|
1180
|
+
terminalEnded: "进程已退出,退出码 {code}",
|
|
1181
|
+
restartTerminal: "重新启动",
|
|
1182
|
+
killTerminal: "终止终端",
|
|
1183
|
+
clearTerminal: "清屏",
|
|
1184
|
+
paste: "粘贴",
|
|
1185
|
+
selectAll: "全选",
|
|
1186
|
+
renameTerminal: "重命名",
|
|
1187
|
+
terminalKeys: "终端按键",
|
|
1188
|
+
terminalAttention: "有新提醒",
|
|
1189
|
+
pipeMode: "服务器上没有 script,终端运行在管道上:全屏程序(vim、top)和密码输入不可用。",
|
|
1190
|
+
address: "输入网址或搜索",
|
|
1191
|
+
back: "后退",
|
|
1192
|
+
forward: "前进",
|
|
1193
|
+
openExternal: "在新窗口打开",
|
|
1194
|
+
recent: "最近访问",
|
|
1195
|
+
home: "起始页",
|
|
1196
|
+
removeRecent: "从最近访问中移除",
|
|
1197
|
+
frameHint: "页面空白时,可在新窗口打开",
|
|
1198
|
+
stop: "停止",
|
|
1199
|
+
openBrowser: "在默认浏览器中打开",
|
|
1200
|
+
loadFailed: "无法打开这个网页",
|
|
1201
|
+
pageCrashed: "这个网页崩溃了",
|
|
1202
|
+
retry: "重试",
|
|
1203
|
+
agentDriving: "Ta 正在操作",
|
|
1204
|
+
pickElement: "选取元素,发给 Ta",
|
|
1205
|
+
pickHint: "点一个元素,Esc 取消",
|
|
1206
|
+
pickedOn: "网页",
|
|
1207
|
+
pickedText: "文字:",
|
|
1208
|
+
pickedAdded: "已放进输入框,说说想怎么改",
|
|
1209
|
+
importSignIns: "导入浏览器登录状态",
|
|
1210
|
+
importTitle: "导入登录状态",
|
|
1211
|
+
importHint: "把所选浏览器的 Cookie 复制到这里,你和 Agent 都能直接使用已登录的网站。不导入密码和浏览记录。",
|
|
1212
|
+
importFrom: "从哪个浏览器导入",
|
|
1213
|
+
noProfiles: "没有找到 Chrome、Edge、Brave、Arc、Vivaldi 或 Chromium 的个人资料。",
|
|
1214
|
+
importNow: "导入…",
|
|
1215
|
+
importing: "导入中…",
|
|
1216
|
+
imported: "已导入 {count} 个 Cookie",
|
|
1217
|
+
importSkipped: "{count} 个无法读取,已跳过。",
|
|
1218
|
+
importAppBound: "{count} 个受 Chrome 应用绑定加密保护,只能在网站上重新登录。",
|
|
1219
|
+
clearBrowserData: "清除内置浏览器数据",
|
|
1220
|
+
clearBrowserDataDetail: "删除内置浏览器的全部 Cookie、网站存储和缓存,网站都需要重新登录。",
|
|
1221
|
+
clear: "清除",
|
|
1222
|
+
cleared: "已清除内置浏览器数据",
|
|
1223
|
+
done: "完成",
|
|
1224
|
+
binary: "二进制文件,不显示内容({size})。",
|
|
1225
|
+
truncated: "文件较大,只显示前 1 MB,不能编辑。",
|
|
1226
|
+
line: "第 {line} 行",
|
|
1227
|
+
diffTitle: "{name}(更改)",
|
|
1228
|
+
stagedTitle: "{name}(已暂存)",
|
|
1229
|
+
unchanged: "内容相同。",
|
|
1230
|
+
skipped: "⋯ {count} 行未更改",
|
|
1231
|
+
failed: "出错了:{message}",
|
|
1232
|
+
preview: "预览",
|
|
1233
|
+
edit: "编辑",
|
|
1234
|
+
save: "保存",
|
|
1235
|
+
saveFailed: "保存失败:{message}",
|
|
1236
|
+
changedOnDisk: "文件已在磁盘上更改。",
|
|
1237
|
+
reload: "放弃我的更改"
|
|
1238
|
+
};
|
|
1207
1239
|
var WORDS = { "zh-CN": ZH, "zh-TW": ZH_TW, "en-US": EN, "ja-JP": JA };
|
|
1208
1240
|
function t(key, vars = {}) {
|
|
1209
1241
|
const words = TaLanguageUtil.pick(pi.ui.language, WORDS);
|
|
@@ -1827,7 +1859,13 @@ function BrowserBar(props) {
|
|
|
1827
1859
|
loading,
|
|
1828
1860
|
favicon: props.favicon,
|
|
1829
1861
|
onOpen: props.onOpen
|
|
1830
|
-
}), props.badge, /* @__PURE__ */ React.createElement(Action, {
|
|
1862
|
+
}), props.badge, props.onPick ? /* @__PURE__ */ React.createElement(Action, {
|
|
1863
|
+
icon: "MousePointerClick",
|
|
1864
|
+
label: t("pickElement"),
|
|
1865
|
+
active: props.picking,
|
|
1866
|
+
disabled: !url,
|
|
1867
|
+
onClick: () => props.onPick?.()
|
|
1868
|
+
}) : undefined, /* @__PURE__ */ React.createElement(Action, {
|
|
1831
1869
|
icon: "House",
|
|
1832
1870
|
label: t("home"),
|
|
1833
1871
|
disabled: !url,
|
|
@@ -1838,7 +1876,7 @@ function BrowserBar(props) {
|
|
|
1838
1876
|
disabled: !props.onOpenOutside,
|
|
1839
1877
|
onClick: () => props.onOpenOutside?.()
|
|
1840
1878
|
}), loading ? /* @__PURE__ */ React.createElement("span", {
|
|
1841
|
-
className: "taw-browser-
|
|
1879
|
+
className: "taw-browser-progress"
|
|
1842
1880
|
}) : undefined);
|
|
1843
1881
|
}
|
|
1844
1882
|
function Site({ address, onOpen, onRemove }) {
|
|
@@ -2537,9 +2575,9 @@ function ImportDialog({ data, onClose, onChanged }) {
|
|
|
2537
2575
|
} else {
|
|
2538
2576
|
body = /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", {
|
|
2539
2577
|
className: "taw-import-hint"
|
|
2540
|
-
}, t("importHint")), profiles === undefined && !error ? /* @__PURE__ */ React.createElement(
|
|
2541
|
-
|
|
2542
|
-
}
|
|
2578
|
+
}, t("importHint")), profiles === undefined && !error ? /* @__PURE__ */ React.createElement(Loading, {
|
|
2579
|
+
compact: true
|
|
2580
|
+
}) : undefined, profiles?.length === 0 ? /* @__PURE__ */ React.createElement("p", {
|
|
2543
2581
|
className: "taw-import-hint"
|
|
2544
2582
|
}, t("noProfiles")) : undefined, profiles && profiles.length > 0 ? /* @__PURE__ */ React.createElement("div", {
|
|
2545
2583
|
className: "taw-import-profiles",
|
|
@@ -2602,6 +2640,155 @@ function ImportSignIns({ onChanged }) {
|
|
|
2602
2640
|
}) : undefined);
|
|
2603
2641
|
}
|
|
2604
2642
|
|
|
2643
|
+
// web-src/browser-pick.ts
|
|
2644
|
+
var PICK_MS = 120000;
|
|
2645
|
+
var MARGIN = 16;
|
|
2646
|
+
var MAX_SIDE = 1600;
|
|
2647
|
+
var TEXT_CHARS = 300;
|
|
2648
|
+
var PICK_SCRIPT = `new Promise(resolve => {
|
|
2649
|
+
const box = document.createElement('div');
|
|
2650
|
+
const tag = document.createElement('div');
|
|
2651
|
+
box.style.cssText = 'position:fixed;z-index:2147483647;pointer-events:none;border:2px solid #10b981;background:rgba(16,185,129,.12);border-radius:4px;transition:all 60ms;display:none';
|
|
2652
|
+
tag.style.cssText = 'position:fixed;z-index:2147483647;pointer-events:none;font:12px/1.4 -apple-system,system-ui,sans-serif;color:#fff;background:#10b981;padding:2px 6px;border-radius:4px;display:none;max-width:60vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap';
|
|
2653
|
+
document.documentElement.append(box, tag);
|
|
2654
|
+
let target = null;
|
|
2655
|
+
const label = el => {
|
|
2656
|
+
const name = (el.getAttribute('aria-label') || el.getAttribute('alt') || el.getAttribute('title') || el.innerText || el.value || '').trim().replace(/\\s+/g, ' ').slice(0, 60);
|
|
2657
|
+
const role = el.getAttribute('role');
|
|
2658
|
+
return el.tagName.toLowerCase() + (role ? '[role=' + role + ']' : '') + (name ? ' "' + name + '"' : '');
|
|
2659
|
+
};
|
|
2660
|
+
const selector = el => {
|
|
2661
|
+
const parts = [];
|
|
2662
|
+
for (let node = el; node && node.nodeType === 1 && parts.length < 5; node = node.parentElement) {
|
|
2663
|
+
if (node.id && document.querySelectorAll('#' + CSS.escape(node.id)).length === 1) {
|
|
2664
|
+
parts.unshift('#' + CSS.escape(node.id));
|
|
2665
|
+
break;
|
|
2666
|
+
}
|
|
2667
|
+
let part = node.tagName.toLowerCase();
|
|
2668
|
+
const classes = [...node.classList].filter(name => !/^(is-|has-|hover|active|focus)/.test(name)).slice(0, 2);
|
|
2669
|
+
if (classes.length) part += '.' + classes.map(name => CSS.escape(name)).join('.');
|
|
2670
|
+
const parent = node.parentElement;
|
|
2671
|
+
if (parent) {
|
|
2672
|
+
const same = [...parent.children].filter(child => child.tagName === node.tagName);
|
|
2673
|
+
if (same.length > 1) part += ':nth-of-type(' + (same.indexOf(node) + 1) + ')';
|
|
2674
|
+
}
|
|
2675
|
+
parts.unshift(part);
|
|
2676
|
+
}
|
|
2677
|
+
return parts.join(' > ');
|
|
2678
|
+
};
|
|
2679
|
+
const show = el => {
|
|
2680
|
+
const r = el.getBoundingClientRect();
|
|
2681
|
+
Object.assign(box.style, { display: 'block', left: r.left + 'px', top: r.top + 'px', width: r.width + 'px', height: r.height + 'px' });
|
|
2682
|
+
tag.textContent = label(el);
|
|
2683
|
+
Object.assign(tag.style, { display: 'block', left: Math.max(0, r.left) + 'px', top: (r.top > 24 ? r.top - 22 : r.bottom + 4) + 'px' });
|
|
2684
|
+
};
|
|
2685
|
+
const move = event => {
|
|
2686
|
+
const el = document.elementFromPoint(event.clientX, event.clientY);
|
|
2687
|
+
if (el && el !== box && el !== tag && el !== target) {
|
|
2688
|
+
target = el;
|
|
2689
|
+
show(el);
|
|
2690
|
+
}
|
|
2691
|
+
};
|
|
2692
|
+
const stop = event => {
|
|
2693
|
+
event.preventDefault();
|
|
2694
|
+
event.stopPropagation();
|
|
2695
|
+
event.stopImmediatePropagation();
|
|
2696
|
+
};
|
|
2697
|
+
const done = value => {
|
|
2698
|
+
clearTimeout(timer);
|
|
2699
|
+
removeEventListener('mousemove', move, true);
|
|
2700
|
+
removeEventListener('click', click, true);
|
|
2701
|
+
removeEventListener('mousedown', stop, true);
|
|
2702
|
+
removeEventListener('mouseup', stop, true);
|
|
2703
|
+
removeEventListener('keydown', key, true);
|
|
2704
|
+
box.remove();
|
|
2705
|
+
tag.remove();
|
|
2706
|
+
resolve(value);
|
|
2707
|
+
};
|
|
2708
|
+
const click = event => {
|
|
2709
|
+
stop(event);
|
|
2710
|
+
const el = target || document.elementFromPoint(event.clientX, event.clientY);
|
|
2711
|
+
if (!el) return done(null);
|
|
2712
|
+
const r = el.getBoundingClientRect();
|
|
2713
|
+
box.remove();
|
|
2714
|
+
tag.remove();
|
|
2715
|
+
done({
|
|
2716
|
+
url: location.href,
|
|
2717
|
+
title: document.title,
|
|
2718
|
+
selector: selector(el),
|
|
2719
|
+
label: label(el),
|
|
2720
|
+
text: (el.innerText || el.value || '').trim().replace(/\\s+/g, ' ').slice(0, ${TEXT_CHARS}),
|
|
2721
|
+
rect: { x: r.left, y: r.top, width: r.width, height: r.height },
|
|
2722
|
+
});
|
|
2723
|
+
};
|
|
2724
|
+
const key = event => {
|
|
2725
|
+
if (event.key === 'Escape') {
|
|
2726
|
+
stop(event);
|
|
2727
|
+
done(null);
|
|
2728
|
+
}
|
|
2729
|
+
};
|
|
2730
|
+
const timer = setTimeout(() => done(null), ${PICK_MS});
|
|
2731
|
+
addEventListener('mousemove', move, true);
|
|
2732
|
+
addEventListener('mousedown', stop, true);
|
|
2733
|
+
addEventListener('mouseup', stop, true);
|
|
2734
|
+
addEventListener('click', click, true);
|
|
2735
|
+
addEventListener('keydown', key, true);
|
|
2736
|
+
})`;
|
|
2737
|
+
var BrowserPickUtil;
|
|
2738
|
+
((BrowserPickUtil) => {
|
|
2739
|
+
function clip2(rect, viewport) {
|
|
2740
|
+
const x = Math.max(0, Math.floor(rect.x - MARGIN));
|
|
2741
|
+
const y = Math.max(0, Math.floor(rect.y - MARGIN));
|
|
2742
|
+
const width = Math.max(1, Math.min(viewport.width - x, Math.ceil(rect.width + 2 * MARGIN), MAX_SIDE));
|
|
2743
|
+
const height = Math.max(1, Math.min(viewport.height - y, Math.ceil(rect.height + 2 * MARGIN), MAX_SIDE));
|
|
2744
|
+
return { x, y, width, height };
|
|
2745
|
+
}
|
|
2746
|
+
BrowserPickUtil.clip = clip2;
|
|
2747
|
+
function quote(picked, words) {
|
|
2748
|
+
const lines = [`${words.on} ${picked.title ? `${picked.title} ` : ""}(${picked.url})`, `\`${picked.selector}\` · ${picked.label}`];
|
|
2749
|
+
if (picked.text && !picked.label.includes(picked.text)) {
|
|
2750
|
+
lines.push(`${words.text}${picked.text}`);
|
|
2751
|
+
}
|
|
2752
|
+
return lines.join(`
|
|
2753
|
+
`);
|
|
2754
|
+
}
|
|
2755
|
+
BrowserPickUtil.quote = quote;
|
|
2756
|
+
})(BrowserPickUtil ||= {});
|
|
2757
|
+
async function pickElement(view, words) {
|
|
2758
|
+
const debug = pi.ui.debugWebview;
|
|
2759
|
+
if (!debug) {
|
|
2760
|
+
return false;
|
|
2761
|
+
}
|
|
2762
|
+
const send = (method, params = {}) => debug(view.getWebContentsId(), method, params);
|
|
2763
|
+
view.focus();
|
|
2764
|
+
const { result, exceptionDetails } = await send("Runtime.evaluate", {
|
|
2765
|
+
expression: PICK_SCRIPT,
|
|
2766
|
+
returnByValue: true,
|
|
2767
|
+
awaitPromise: true,
|
|
2768
|
+
userGesture: true
|
|
2769
|
+
});
|
|
2770
|
+
if (exceptionDetails) {
|
|
2771
|
+
throw new Error(exceptionDetails.text ?? "The page did not let the element be picked.");
|
|
2772
|
+
}
|
|
2773
|
+
const picked = result?.value;
|
|
2774
|
+
if (!picked) {
|
|
2775
|
+
return false;
|
|
2776
|
+
}
|
|
2777
|
+
await new Promise((resolve) => setTimeout(resolve, 60));
|
|
2778
|
+
const { cssVisualViewport: viewport } = await send("Page.getLayoutMetrics");
|
|
2779
|
+
const area = BrowserPickUtil.clip(picked.rect, { width: viewport.clientWidth, height: viewport.clientHeight });
|
|
2780
|
+
const shot = await send("Page.captureScreenshot", {
|
|
2781
|
+
format: "png",
|
|
2782
|
+
clip: { x: viewport.pageX + area.x, y: viewport.pageY + area.y, width: area.width, height: area.height, scale: 1 }
|
|
2783
|
+
}).catch(() => {
|
|
2784
|
+
return;
|
|
2785
|
+
});
|
|
2786
|
+
return pi.ui.addToComposer({
|
|
2787
|
+
quote: BrowserPickUtil.quote(picked, words),
|
|
2788
|
+
images: shot?.data ? [{ data: shot.data, mimeType: "image/png" }] : undefined
|
|
2789
|
+
});
|
|
2790
|
+
}
|
|
2791
|
+
|
|
2605
2792
|
// web-src/browser-webview.tsx
|
|
2606
2793
|
var ERR_ABORTED = -3;
|
|
2607
2794
|
var NO_PAGE = { url: "", title: "", loading: false, canGoBack: false, canGoForward: false };
|
|
@@ -2773,6 +2960,15 @@ function WebviewBrowser() {
|
|
|
2773
2960
|
call((element) => element.reload());
|
|
2774
2961
|
}
|
|
2775
2962
|
};
|
|
2963
|
+
const [picking, setPicking] = React.useState(false);
|
|
2964
|
+
const pick = () => {
|
|
2965
|
+
const element = view.current;
|
|
2966
|
+
if (!element || !ready.current || picking) {
|
|
2967
|
+
return;
|
|
2968
|
+
}
|
|
2969
|
+
setPicking(true);
|
|
2970
|
+
pickElement(element, { on: t("pickedOn"), text: t("pickedText") }).then((added) => added === false || pi.ui.notify(t("pickedAdded"), "info"), (error) => pi.ui.notify(String(error instanceof Error ? error.message : error), "error")).finally(() => setPicking(false));
|
|
2971
|
+
};
|
|
2776
2972
|
const address = home ? "" : WorkspaceUtil.unforward(page.url || request.url, request.url, shown);
|
|
2777
2973
|
const current = page.url || shown;
|
|
2778
2974
|
return /* @__PURE__ */ React.createElement("div", {
|
|
@@ -2791,8 +2987,15 @@ function WebviewBrowser() {
|
|
|
2791
2987
|
onOpen: go,
|
|
2792
2988
|
onHome: () => setHome(true),
|
|
2793
2989
|
onOpenOutside: !home && current ? () => openOutside(current) : undefined,
|
|
2990
|
+
onPick: pi.ui.debugWebview && !home && !failure ? pick : undefined,
|
|
2991
|
+
picking,
|
|
2794
2992
|
outsideLabel: t("openBrowser"),
|
|
2795
|
-
badge:
|
|
2993
|
+
badge: picking ? /* @__PURE__ */ React.createElement("span", {
|
|
2994
|
+
className: "taw-browser-driven",
|
|
2995
|
+
role: "status"
|
|
2996
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
2997
|
+
className: "taw-browser-driven-dot"
|
|
2998
|
+
}), t("pickHint")) : driven ? /* @__PURE__ */ React.createElement("span", {
|
|
2796
2999
|
className: "taw-browser-driven",
|
|
2797
3000
|
role: "status"
|
|
2798
3001
|
}, /* @__PURE__ */ React.createElement("span", {
|
|
@@ -6213,8 +6416,515 @@ function MediaPreview({
|
|
|
6213
6416
|
|
|
6214
6417
|
// ../ta-protocol/esm/common/access-protocol.js
|
|
6215
6418
|
var TaAccessServer = Symbol("TaAccessServer");
|
|
6419
|
+
var TA_SIGN_IN_PATH = "/sign-in";
|
|
6420
|
+
var TA_DEVICE_SIGN_IN_PATH = `${TA_SIGN_IN_PATH}/device`;
|
|
6421
|
+
// ../ta-protocol/esm/common/ta-extension-host.js
|
|
6422
|
+
var TA_WEBHOOK_MAX_BYTES = 256 * 1024;
|
|
6423
|
+
var TA_HOST_EVENT = "ta:host";
|
|
6424
|
+
var TaHostUtil;
|
|
6425
|
+
(function(TaHostUtil2) {
|
|
6426
|
+
TaHostUtil2.WAIT_MS = 1000;
|
|
6427
|
+
function reach(events, name, waitMs = TaHostUtil2.WAIT_MS) {
|
|
6428
|
+
return new Promise((resolve) => {
|
|
6429
|
+
let heard = false;
|
|
6430
|
+
let answered = false;
|
|
6431
|
+
const timer = setTimeout(() => resolve(undefined), waitMs);
|
|
6432
|
+
const request = {
|
|
6433
|
+
name,
|
|
6434
|
+
heard: () => {
|
|
6435
|
+
heard = true;
|
|
6436
|
+
},
|
|
6437
|
+
resolve: (answer) => {
|
|
6438
|
+
answered = true;
|
|
6439
|
+
clearTimeout(timer);
|
|
6440
|
+
resolve(answer);
|
|
6441
|
+
}
|
|
6442
|
+
};
|
|
6443
|
+
events.emit(TA_HOST_EVENT, request);
|
|
6444
|
+
if (!heard && !answered) {
|
|
6445
|
+
clearTimeout(timer);
|
|
6446
|
+
resolve(undefined);
|
|
6447
|
+
}
|
|
6448
|
+
});
|
|
6449
|
+
}
|
|
6450
|
+
TaHostUtil2.reach = reach;
|
|
6451
|
+
function marked2(systemPrompt, mark) {
|
|
6452
|
+
return role(systemPrompt).includes(mark);
|
|
6453
|
+
}
|
|
6454
|
+
TaHostUtil2.marked = marked2;
|
|
6455
|
+
function role(systemPrompt) {
|
|
6456
|
+
if (!systemPrompt) {
|
|
6457
|
+
return "";
|
|
6458
|
+
}
|
|
6459
|
+
const open = `<addendum>
|
|
6460
|
+
`;
|
|
6461
|
+
const start = systemPrompt.indexOf(open);
|
|
6462
|
+
const context = systemPrompt.indexOf(`<project_context>
|
|
6463
|
+
`);
|
|
6464
|
+
if (start < 0 || context >= 0 && context < start) {
|
|
6465
|
+
return "";
|
|
6466
|
+
}
|
|
6467
|
+
const end = systemPrompt.indexOf(`
|
|
6468
|
+
</addendum>`, start);
|
|
6469
|
+
return systemPrompt.slice(start + open.length, end < 0 ? undefined : end);
|
|
6470
|
+
}
|
|
6471
|
+
TaHostUtil2.role = role;
|
|
6472
|
+
})(TaHostUtil || (TaHostUtil = {}));
|
|
6473
|
+
var TA_ASK_ENTRY = "ta-ask";
|
|
6474
|
+
var TaAskUtil;
|
|
6475
|
+
(function(TaAskUtil2) {
|
|
6476
|
+
const LENGTH = 120;
|
|
6477
|
+
function entry(question) {
|
|
6478
|
+
const line = question.replace(/\s+/g, " ").trim();
|
|
6479
|
+
return { question: line.length > LENGTH ? `${line.slice(0, LENGTH - 1)}…` : line };
|
|
6480
|
+
}
|
|
6481
|
+
TaAskUtil2.entry = entry;
|
|
6482
|
+
function asking(entries) {
|
|
6483
|
+
var _a;
|
|
6484
|
+
for (let i = entries.length - 1;i >= 0; i--) {
|
|
6485
|
+
const entry2 = entries[i];
|
|
6486
|
+
if (entry2.type === "message" && ((_a = entry2.message) === null || _a === undefined ? undefined : _a.role) === "user") {
|
|
6487
|
+
return;
|
|
6488
|
+
}
|
|
6489
|
+
if (entry2.type === "custom" && entry2.customType === TA_ASK_ENTRY) {
|
|
6490
|
+
return read(entry2);
|
|
6491
|
+
}
|
|
6492
|
+
}
|
|
6493
|
+
return;
|
|
6494
|
+
}
|
|
6495
|
+
TaAskUtil2.asking = asking;
|
|
6496
|
+
function next(asked, entry2) {
|
|
6497
|
+
var _a;
|
|
6498
|
+
if (entry2.type === "message" && ((_a = entry2.message) === null || _a === undefined ? undefined : _a.role) === "user") {
|
|
6499
|
+
return;
|
|
6500
|
+
}
|
|
6501
|
+
return entry2.type === "custom" && entry2.customType === TA_ASK_ENTRY ? read(entry2) : asked;
|
|
6502
|
+
}
|
|
6503
|
+
TaAskUtil2.next = next;
|
|
6504
|
+
function read(found) {
|
|
6505
|
+
var _a;
|
|
6506
|
+
const question = (_a = found.data) === null || _a === undefined ? undefined : _a.question;
|
|
6507
|
+
if (typeof question !== "string" || !question.trim()) {
|
|
6508
|
+
return;
|
|
6509
|
+
}
|
|
6510
|
+
const at2 = found.timestamp ? Date.parse(found.timestamp) : Number.NaN;
|
|
6511
|
+
return { question: entry(question).question, at: Number.isNaN(at2) ? 0 : at2 };
|
|
6512
|
+
}
|
|
6513
|
+
})(TaAskUtil || (TaAskUtil = {}));
|
|
6514
|
+
|
|
6515
|
+
// ../ta-protocol/esm/common/delegate-protocol.js
|
|
6516
|
+
var TaDelegateUtil;
|
|
6517
|
+
(function(TaDelegateUtil2) {
|
|
6518
|
+
TaDelegateUtil2.LEVELS = ["less", "balanced", "more"];
|
|
6519
|
+
TaDelegateUtil2.DEFAULT = "balanced";
|
|
6520
|
+
TaDelegateUtil2.WORK_TOOLS = ["read", "bash", "powershell", "edit", "write", "grep", "find", "ls"];
|
|
6521
|
+
TaDelegateUtil2.CHANGE_TOOLS = ["edit", "write"];
|
|
6522
|
+
const LIMITS = {
|
|
6523
|
+
less: { noChanges: false },
|
|
6524
|
+
balanced: { noChanges: true, steps: 6 },
|
|
6525
|
+
more: { noChanges: true, steps: 2 }
|
|
6526
|
+
};
|
|
6527
|
+
function parse(value) {
|
|
6528
|
+
return TaDelegateUtil2.LEVELS.includes(value) ? value : TaDelegateUtil2.DEFAULT;
|
|
6529
|
+
}
|
|
6530
|
+
TaDelegateUtil2.parse = parse;
|
|
6531
|
+
function mark(level) {
|
|
6532
|
+
return `(delegate=${level})`;
|
|
6533
|
+
}
|
|
6534
|
+
TaDelegateUtil2.mark = mark;
|
|
6535
|
+
function levelOf(systemPrompt) {
|
|
6536
|
+
const role = TaHostUtil.role(systemPrompt);
|
|
6537
|
+
return TaDelegateUtil2.LEVELS.find((level) => role.includes(mark(level)));
|
|
6538
|
+
}
|
|
6539
|
+
TaDelegateUtil2.levelOf = levelOf;
|
|
6540
|
+
function limits(level) {
|
|
6541
|
+
return LIMITS[level];
|
|
6542
|
+
}
|
|
6543
|
+
TaDelegateUtil2.limits = limits;
|
|
6544
|
+
function refusal(level, tool, steps) {
|
|
6545
|
+
if (!TaDelegateUtil2.WORK_TOOLS.includes(tool)) {
|
|
6546
|
+
return;
|
|
6547
|
+
}
|
|
6548
|
+
const limit = LIMITS[level];
|
|
6549
|
+
if (limit.noChanges && TaDelegateUtil2.CHANGE_TOOLS.includes(tool)) {
|
|
6550
|
+
return "You do not change files yourself: hand this to a task with start_task, with instructions complete enough to do it. The user set how much you hand out in the settings of the double.";
|
|
6551
|
+
}
|
|
6552
|
+
if (limit.steps !== undefined && steps >= limit.steps) {
|
|
6553
|
+
return "You have looked enough for this: hand the work to a task with start_task now, with what you found in its instructions, and tell the user what you started.";
|
|
6554
|
+
}
|
|
6555
|
+
return;
|
|
6556
|
+
}
|
|
6557
|
+
TaDelegateUtil2.refusal = refusal;
|
|
6558
|
+
})(TaDelegateUtil || (TaDelegateUtil = {}));
|
|
6559
|
+
|
|
6560
|
+
// ../ta-protocol/esm/common/app-protocol.js
|
|
6561
|
+
var FONT_SIZES = ["small", "standard", "large", "xlarge"];
|
|
6562
|
+
var words = (en, zh, tw, ja) => ({ "en-US": en, "zh-CN": zh, "zh-TW": tw, "ja-JP": ja });
|
|
6563
|
+
var SYSTEM = words("as the system", "跟随系统", "跟隨系統", "システムに合わせる");
|
|
6564
|
+
var FONT_SHOWN = {
|
|
6565
|
+
small: words("small", "小", "小", "小"),
|
|
6566
|
+
standard: words("standard", "标准", "標準", "標準"),
|
|
6567
|
+
large: words("large", "大", "大", "大"),
|
|
6568
|
+
xlarge: words("extra large", "特大", "特大", "特大")
|
|
6569
|
+
};
|
|
6570
|
+
var TA_WEB_SETTINGS = [
|
|
6571
|
+
{
|
|
6572
|
+
key: "theme",
|
|
6573
|
+
type: "enum",
|
|
6574
|
+
values: ["system", "light", "dark"],
|
|
6575
|
+
default: "system",
|
|
6576
|
+
what: "Light or dark look; system follows the device.",
|
|
6577
|
+
title: words("Theme", "外观", "外觀", "外観"),
|
|
6578
|
+
shown: { system: SYSTEM, light: words("light", "浅色", "淺色", "ライト"), dark: words("dark", "深色", "深色", "ダーク") }
|
|
6579
|
+
},
|
|
6580
|
+
{
|
|
6581
|
+
key: "language",
|
|
6582
|
+
type: "enum",
|
|
6583
|
+
values: ["system", ...TaLanguageUtil.ALL],
|
|
6584
|
+
default: "system",
|
|
6585
|
+
what: "The language of Ta's pages and of what Ta says; system follows the device.",
|
|
6586
|
+
title: words("Language", "语言", "語言", "言語"),
|
|
6587
|
+
shown: {
|
|
6588
|
+
system: SYSTEM,
|
|
6589
|
+
...Object.fromEntries(TaLanguageUtil.ALL.map((language) => [
|
|
6590
|
+
language,
|
|
6591
|
+
words(TaLanguageUtil.NAMES[language], TaLanguageUtil.NAMES[language], TaLanguageUtil.NAMES[language], TaLanguageUtil.NAMES[language])
|
|
6592
|
+
]))
|
|
6593
|
+
}
|
|
6594
|
+
},
|
|
6595
|
+
{
|
|
6596
|
+
key: "fontSize",
|
|
6597
|
+
type: "enum",
|
|
6598
|
+
values: FONT_SIZES,
|
|
6599
|
+
default: "standard",
|
|
6600
|
+
what: "The size of the text of the whole page.",
|
|
6601
|
+
title: words("Text size", "字体大小", "字型大小", "文字サイズ"),
|
|
6602
|
+
shown: FONT_SHOWN
|
|
6603
|
+
},
|
|
6604
|
+
{
|
|
6605
|
+
key: "chatFontSize",
|
|
6606
|
+
type: "enum",
|
|
6607
|
+
values: FONT_SIZES,
|
|
6608
|
+
default: "standard",
|
|
6609
|
+
what: "The size of the text of conversations, on top of fontSize.",
|
|
6610
|
+
title: words("Text size of conversations", "对话字体大小", "對話字型大小", "会話の文字サイズ"),
|
|
6611
|
+
shown: FONT_SHOWN
|
|
6612
|
+
},
|
|
6613
|
+
{
|
|
6614
|
+
key: "speak",
|
|
6615
|
+
type: "boolean",
|
|
6616
|
+
default: false,
|
|
6617
|
+
what: "Read every reply aloud.",
|
|
6618
|
+
title: words("Read replies aloud", "朗读回复", "朗讀回覆", "返信を読み上げ")
|
|
6619
|
+
},
|
|
6620
|
+
{
|
|
6621
|
+
key: "speakTalk",
|
|
6622
|
+
type: "boolean",
|
|
6623
|
+
default: false,
|
|
6624
|
+
what: "Read the reply aloud when the user spoke to the double by voice.",
|
|
6625
|
+
title: words("Read aloud what was asked by voice", "语音提问时朗读回复", "語音提問時朗讀回覆", "音声で聞いたら読み上げ")
|
|
6626
|
+
},
|
|
6627
|
+
{
|
|
6628
|
+
key: "callCaptions",
|
|
6629
|
+
type: "boolean",
|
|
6630
|
+
default: false,
|
|
6631
|
+
what: "Show captions in a call: what the user says and what Ta reads.",
|
|
6632
|
+
title: words("Call captions", "通话字幕", "通話字幕", "通話の字幕")
|
|
6633
|
+
},
|
|
6634
|
+
{
|
|
6635
|
+
key: "voice",
|
|
6636
|
+
type: "string",
|
|
6637
|
+
default: "",
|
|
6638
|
+
what: "The voice replies are read with (a voiceURI of the device's voices); empty for the most natural one.",
|
|
6639
|
+
title: words("Voice", "朗读声音", "朗讀聲音", "読み上げの声")
|
|
6640
|
+
},
|
|
6641
|
+
{
|
|
6642
|
+
key: "confirmTasks",
|
|
6643
|
+
type: "boolean",
|
|
6644
|
+
default: false,
|
|
6645
|
+
what: "The double asks before it hands out work.",
|
|
6646
|
+
title: words("Ask before handing out work", "派任务前先问我", "派任務前先問我", "作業を割り当てる前に確認")
|
|
6647
|
+
},
|
|
6648
|
+
{
|
|
6649
|
+
key: "maxTasks",
|
|
6650
|
+
type: "number",
|
|
6651
|
+
values: [0, 2, 4, 8],
|
|
6652
|
+
default: 0,
|
|
6653
|
+
what: "How many of the double's tasks run at once; 0 for as many as it starts.",
|
|
6654
|
+
title: words("Tasks at once", "同时运行的任务", "同時執行的任務", "同時に実行するタスク")
|
|
6655
|
+
},
|
|
6656
|
+
{
|
|
6657
|
+
key: "delegate",
|
|
6658
|
+
type: "enum",
|
|
6659
|
+
values: TaDelegateUtil.LEVELS,
|
|
6660
|
+
default: TaDelegateUtil.DEFAULT,
|
|
6661
|
+
what: "How much of the work the double hands out to tasks rather than doing it itself.",
|
|
6662
|
+
title: words("Hand out work", "派活多少", "派活多少", "作業の割り当て"),
|
|
6663
|
+
shown: { less: words("less", "少", "少", "少なめ"), balanced: words("balanced", "适中", "適中", "ふつう"), more: words("more", "多", "多", "多め") }
|
|
6664
|
+
},
|
|
6665
|
+
{
|
|
6666
|
+
key: "assistantModel",
|
|
6667
|
+
type: "model",
|
|
6668
|
+
default: "",
|
|
6669
|
+
what: "The model of the double, <provider>/<model id>; empty for the default model.",
|
|
6670
|
+
title: words("Model of the double", "分身的模型", "分身的模型", "分身のモデル")
|
|
6671
|
+
},
|
|
6672
|
+
{
|
|
6673
|
+
key: "taskModel",
|
|
6674
|
+
type: "model",
|
|
6675
|
+
default: "",
|
|
6676
|
+
what: "The model of the tasks the double starts; empty for the default model.",
|
|
6677
|
+
title: words("Model of tasks", "任务的模型", "任務的模型", "タスクのモデル")
|
|
6678
|
+
},
|
|
6679
|
+
{ key: "reduceMotion", type: "boolean", default: false, what: "Fewer animations.", title: words("Reduce motion", "减少动画", "減少動畫", "動きを減らす") },
|
|
6680
|
+
{
|
|
6681
|
+
key: "diagramStyle",
|
|
6682
|
+
type: "enum",
|
|
6683
|
+
values: ["clean", "sketch", "colour", "motion"],
|
|
6684
|
+
default: "clean",
|
|
6685
|
+
what: "How diagrams in replies draw: in the colours of the page, as by hand, a colour to a node, or coming in with flowing lines.",
|
|
6686
|
+
title: words("Diagram style", "图表风格", "圖表風格", "図のスタイル"),
|
|
6687
|
+
shown: {
|
|
6688
|
+
clean: words("clean", "简洁", "簡潔", "シンプル"),
|
|
6689
|
+
sketch: words("sketch", "草图", "草圖", "スケッチ"),
|
|
6690
|
+
colour: words("colour", "彩色", "彩色", "カラー"),
|
|
6691
|
+
motion: words("motion", "动效", "動效", "モーション")
|
|
6692
|
+
}
|
|
6693
|
+
},
|
|
6694
|
+
{
|
|
6695
|
+
key: "keepAliveMinutes",
|
|
6696
|
+
type: "number",
|
|
6697
|
+
values: [1, 5, 15, 30],
|
|
6698
|
+
default: 5,
|
|
6699
|
+
what: "How long an extension started on open keeps running once left, in minutes.",
|
|
6700
|
+
title: words("Keep extensions running", "扩展离开后保留", "擴充功能離開後保留", "拡張機能を保持")
|
|
6701
|
+
},
|
|
6702
|
+
{
|
|
6703
|
+
key: "chatFoldDays",
|
|
6704
|
+
type: "number",
|
|
6705
|
+
values: [3, 7, 30, 0],
|
|
6706
|
+
default: 7,
|
|
6707
|
+
what: "Conversations not updated for these days fold at the end of the list; 0 for none.",
|
|
6708
|
+
title: words("Fold old conversations", "折叠旧对话", "摺疊舊對話", "古い会話を折りたたむ")
|
|
6709
|
+
},
|
|
6710
|
+
{
|
|
6711
|
+
key: "chatArchiveDays",
|
|
6712
|
+
type: "number",
|
|
6713
|
+
values: [30, 90, 365, 0],
|
|
6714
|
+
default: 30,
|
|
6715
|
+
what: "Conversations not updated for these days are archived (out of the list, found by search); 0 for none.",
|
|
6716
|
+
title: words("Archive old conversations", "归档旧对话", "歸檔舊對話", "古い会話をアーカイブ")
|
|
6717
|
+
},
|
|
6718
|
+
{
|
|
6719
|
+
key: "recentShots",
|
|
6720
|
+
type: "boolean",
|
|
6721
|
+
default: true,
|
|
6722
|
+
what: "The screenshot just taken is offered above the message box, once.",
|
|
6723
|
+
title: words("Offer recent screenshots", "提示刚截的图", "提示剛截的圖", "撮ったばかりのスクリーンショットを提案")
|
|
6724
|
+
}
|
|
6725
|
+
];
|
|
6726
|
+
var TaAppUtil;
|
|
6727
|
+
(function(TaAppUtil2) {
|
|
6728
|
+
function check(spec, value) {
|
|
6729
|
+
var _a, _b;
|
|
6730
|
+
switch (spec.type) {
|
|
6731
|
+
case "boolean":
|
|
6732
|
+
return typeof value === "boolean" ? undefined : "true or false";
|
|
6733
|
+
case "string":
|
|
6734
|
+
return typeof value === "string" ? undefined : "a string";
|
|
6735
|
+
case "model":
|
|
6736
|
+
return value === "" || typeof value === "string" && /^[^/\s]+\/\S+$/.test(value) ? undefined : "<provider>/<model id>, or empty";
|
|
6737
|
+
default:
|
|
6738
|
+
return ((_a = spec.values) === null || _a === undefined ? undefined : _a.includes(value)) ? undefined : `one of ${(_b = spec.values) === null || _b === undefined ? undefined : _b.map((one) => JSON.stringify(one)).join(", ")}`;
|
|
6739
|
+
}
|
|
6740
|
+
}
|
|
6741
|
+
TaAppUtil2.check = check;
|
|
6742
|
+
function shown(value, language, spec) {
|
|
6743
|
+
var _a;
|
|
6744
|
+
const named = (_a = spec === null || spec === undefined ? undefined : spec.shown) === null || _a === undefined ? undefined : _a[String(value)];
|
|
6745
|
+
if (named) {
|
|
6746
|
+
return TaLanguageUtil.pick(language, named);
|
|
6747
|
+
}
|
|
6748
|
+
if (typeof value === "boolean") {
|
|
6749
|
+
return TaLanguageUtil.pick(language, value ? words("on", "开", "開", "オン") : words("off", "关", "關", "オフ"));
|
|
6750
|
+
}
|
|
6751
|
+
if (value === "" || value === undefined || value === null) {
|
|
6752
|
+
return TaLanguageUtil.pick(language, words("default", "默认", "預設", "デフォルト"));
|
|
6753
|
+
}
|
|
6754
|
+
return String(value);
|
|
6755
|
+
}
|
|
6756
|
+
TaAppUtil2.shown = shown;
|
|
6757
|
+
})(TaAppUtil || (TaAppUtil = {}));
|
|
6216
6758
|
// ../ta-protocol/esm/common/auth-protocol.js
|
|
6217
6759
|
var TaAuthServer = Symbol("TaAuthServer");
|
|
6760
|
+
// ../ta-protocol/esm/common/deployment-protocol.js
|
|
6761
|
+
var TA_WELL_KNOWN_PATH = "/.well-known/ta";
|
|
6762
|
+
|
|
6763
|
+
class TaDeploymentError extends Error {
|
|
6764
|
+
}
|
|
6765
|
+
var TaDeploymentUtil;
|
|
6766
|
+
(function(TaDeploymentUtil2) {
|
|
6767
|
+
TaDeploymentUtil2.DISTRIBUTION_FILE = "distribution.json";
|
|
6768
|
+
function url(value) {
|
|
6769
|
+
if (typeof value !== "string" || !value.trim()) {
|
|
6770
|
+
return;
|
|
6771
|
+
}
|
|
6772
|
+
try {
|
|
6773
|
+
const parsed = new URL(value.trim());
|
|
6774
|
+
if (!/^https?:$/.test(parsed.protocol) || parsed.search || parsed.hash || parsed.username || parsed.password) {
|
|
6775
|
+
return;
|
|
6776
|
+
}
|
|
6777
|
+
return `${parsed.origin}${parsed.pathname}`.replace(/\/+$/, "");
|
|
6778
|
+
} catch (_a) {
|
|
6779
|
+
return;
|
|
6780
|
+
}
|
|
6781
|
+
}
|
|
6782
|
+
TaDeploymentUtil2.url = url;
|
|
6783
|
+
function name(value) {
|
|
6784
|
+
return typeof value === "string" && value.trim() ? value.trim().slice(0, 80) : undefined;
|
|
6785
|
+
}
|
|
6786
|
+
function describe(env, own, version) {
|
|
6787
|
+
var _a, _b;
|
|
6788
|
+
const gateway = (_a = url(own.gateway)) !== null && _a !== undefined ? _a : url(env.TA_GATEWAY_URL);
|
|
6789
|
+
const relay = (_b = url(own.relay)) !== null && _b !== undefined ? _b : url(env.TA_RELAY_URL);
|
|
6790
|
+
const called = name(env.TA_DEPLOYMENT_NAME);
|
|
6791
|
+
return { v: 1, ...called ? { name: called } : {}, ...gateway ? { gateway } : {}, ...relay ? { relay } : {}, ...version ? { version } : {} };
|
|
6792
|
+
}
|
|
6793
|
+
TaDeploymentUtil2.describe = describe;
|
|
6794
|
+
TaDeploymentUtil2.HEADERS = {
|
|
6795
|
+
"content-type": "application/json",
|
|
6796
|
+
"access-control-allow-origin": "*",
|
|
6797
|
+
"cache-control": "no-store"
|
|
6798
|
+
};
|
|
6799
|
+
function parse(value) {
|
|
6800
|
+
const given = value;
|
|
6801
|
+
if (!given || typeof given !== "object" || given.v !== 1) {
|
|
6802
|
+
return;
|
|
6803
|
+
}
|
|
6804
|
+
const deployment = describe({ TA_DEPLOYMENT_NAME: given.name, TA_GATEWAY_URL: given.gateway, TA_RELAY_URL: given.relay }, {});
|
|
6805
|
+
const version = name(given.version);
|
|
6806
|
+
return version ? { ...deployment, version } : deployment;
|
|
6807
|
+
}
|
|
6808
|
+
TaDeploymentUtil2.parse = parse;
|
|
6809
|
+
async function discover(address, timeoutMs = 6000) {
|
|
6810
|
+
const base = url(address);
|
|
6811
|
+
if (!base) {
|
|
6812
|
+
throw new TaDeploymentError(`${address} is not an address of http or https.`);
|
|
6813
|
+
}
|
|
6814
|
+
const controller = new AbortController;
|
|
6815
|
+
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
6816
|
+
try {
|
|
6817
|
+
const response = await fetch(`${base}${TA_WELL_KNOWN_PATH}`, { signal: controller.signal, redirect: "follow" });
|
|
6818
|
+
if (!response.ok) {
|
|
6819
|
+
throw new TaDeploymentError(`${base} is not a deployment of Ta (${response.status}).`);
|
|
6820
|
+
}
|
|
6821
|
+
const deployment = parse(await response.json().catch(() => {
|
|
6822
|
+
return;
|
|
6823
|
+
}));
|
|
6824
|
+
if (!deployment || !deployment.gateway && !deployment.relay) {
|
|
6825
|
+
throw new TaDeploymentError(`${base} is not a deployment of Ta.`);
|
|
6826
|
+
}
|
|
6827
|
+
return deployment;
|
|
6828
|
+
} catch (error) {
|
|
6829
|
+
if ((error === null || error === undefined ? undefined : error.name) === "AbortError") {
|
|
6830
|
+
throw new TaDeploymentError(`${base} did not answer in time.`);
|
|
6831
|
+
}
|
|
6832
|
+
throw error;
|
|
6833
|
+
} finally {
|
|
6834
|
+
clearTimeout(timer);
|
|
6835
|
+
}
|
|
6836
|
+
}
|
|
6837
|
+
TaDeploymentUtil2.discover = discover;
|
|
6838
|
+
function distribution(value) {
|
|
6839
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
6840
|
+
throw new TaDeploymentError(`${TaDeploymentUtil2.DISTRIBUTION_FILE} holds a JSON object.`);
|
|
6841
|
+
}
|
|
6842
|
+
const given = value;
|
|
6843
|
+
const result = {};
|
|
6844
|
+
if (given.name !== undefined) {
|
|
6845
|
+
result.name = name(given.name);
|
|
6846
|
+
}
|
|
6847
|
+
for (const key of ["relay", "gateway"]) {
|
|
6848
|
+
if (given[key] !== undefined) {
|
|
6849
|
+
const address = url(given[key]);
|
|
6850
|
+
if (!address) {
|
|
6851
|
+
throw new TaDeploymentError(`"${key}" of ${TaDeploymentUtil2.DISTRIBUTION_FILE} is not an address of http or https.`);
|
|
6852
|
+
}
|
|
6853
|
+
result[key] = address;
|
|
6854
|
+
}
|
|
6855
|
+
}
|
|
6856
|
+
if (given.updates !== undefined) {
|
|
6857
|
+
const updates = given.updates;
|
|
6858
|
+
const base = url(updates === null || updates === undefined ? undefined : updates.base);
|
|
6859
|
+
if (!base && (updates === null || updates === undefined ? undefined : updates.base) !== undefined) {
|
|
6860
|
+
throw new TaDeploymentError(`"updates.base" of ${TaDeploymentUtil2.DISTRIBUTION_FILE} is not an address of http or https.`);
|
|
6861
|
+
}
|
|
6862
|
+
const key = typeof (updates === null || updates === undefined ? undefined : updates.key) === "string" && updates.key.includes("PUBLIC KEY") ? updates.key : undefined;
|
|
6863
|
+
if ((updates === null || updates === undefined ? undefined : updates.key) !== undefined && !key) {
|
|
6864
|
+
throw new TaDeploymentError(`"updates.key" of ${TaDeploymentUtil2.DISTRIBUTION_FILE} is a public key in PEM.`);
|
|
6865
|
+
}
|
|
6866
|
+
result.updates = { ...base ? { base } : {}, ...key ? { key } : {} };
|
|
6867
|
+
}
|
|
6868
|
+
if (given.reach !== undefined) {
|
|
6869
|
+
result.reach = reach(given.reach);
|
|
6870
|
+
}
|
|
6871
|
+
if (given.inside !== undefined) {
|
|
6872
|
+
const inside = url(given.inside);
|
|
6873
|
+
if (!inside) {
|
|
6874
|
+
throw new TaDeploymentError(`"inside" of ${TaDeploymentUtil2.DISTRIBUTION_FILE} is not an address of http or https.`);
|
|
6875
|
+
}
|
|
6876
|
+
result.inside = inside;
|
|
6877
|
+
}
|
|
6878
|
+
return result;
|
|
6879
|
+
}
|
|
6880
|
+
TaDeploymentUtil2.distribution = distribution;
|
|
6881
|
+
function reach(value) {
|
|
6882
|
+
const given = typeof value === "string" ? { "*": value } : value;
|
|
6883
|
+
const entries = given && typeof given === "object" && !Array.isArray(given) ? Object.entries(given) : [];
|
|
6884
|
+
const result = {};
|
|
6885
|
+
for (const [language, text2] of entries) {
|
|
6886
|
+
if (typeof text2 !== "string" || !text2.trim()) {
|
|
6887
|
+
throw new TaDeploymentError(`"reach.${language}" of ${TaDeploymentUtil2.DISTRIBUTION_FILE} is not a sentence.`);
|
|
6888
|
+
}
|
|
6889
|
+
result[language] = text2.trim().slice(0, 200);
|
|
6890
|
+
}
|
|
6891
|
+
if (Object.keys(result).length === 0) {
|
|
6892
|
+
throw new TaDeploymentError(`"reach" of ${TaDeploymentUtil2.DISTRIBUTION_FILE} is a sentence, or one by language.`);
|
|
6893
|
+
}
|
|
6894
|
+
return result;
|
|
6895
|
+
}
|
|
6896
|
+
function reachIn(reach2, language) {
|
|
6897
|
+
var _a, _b, _c, _d, _e;
|
|
6898
|
+
if (!reach2) {
|
|
6899
|
+
return;
|
|
6900
|
+
}
|
|
6901
|
+
const base = language.split("-")[0];
|
|
6902
|
+
const near = Object.keys(reach2).find((key) => key.split("-")[0] === base);
|
|
6903
|
+
return (_e = (_d = (_c = (_b = (_a = reach2[language]) !== null && _a !== undefined ? _a : reach2[base]) !== null && _b !== undefined ? _b : near && reach2[near]) !== null && _c !== undefined ? _c : reach2["*"]) !== null && _d !== undefined ? _d : reach2.en) !== null && _e !== undefined ? _e : Object.values(reach2)[0];
|
|
6904
|
+
}
|
|
6905
|
+
TaDeploymentUtil2.reachIn = reachIn;
|
|
6906
|
+
function apply(distribution2, env) {
|
|
6907
|
+
const defaults = { TA_DEPLOYMENT_NAME: distribution2.name, TA_RELAY_URL: distribution2.relay, TA_GATEWAY_URL: distribution2.gateway };
|
|
6908
|
+
for (const [key, value] of Object.entries(defaults)) {
|
|
6909
|
+
if (value && !env[key]) {
|
|
6910
|
+
env[key] = value;
|
|
6911
|
+
}
|
|
6912
|
+
}
|
|
6913
|
+
}
|
|
6914
|
+
TaDeploymentUtil2.apply = apply;
|
|
6915
|
+
})(TaDeploymentUtil || (TaDeploymentUtil = {}));
|
|
6916
|
+
// ../ta-protocol/esm/common/error-protocol.js
|
|
6917
|
+
var TaErrorUtil;
|
|
6918
|
+
(function(TaErrorUtil2) {
|
|
6919
|
+
function code(error) {
|
|
6920
|
+
var _a;
|
|
6921
|
+
var _b;
|
|
6922
|
+
const failure = error;
|
|
6923
|
+
const code2 = (_b = failure === null || failure === undefined ? undefined : failure.code) !== null && _b !== undefined ? _b : (_a = failure === null || failure === undefined ? undefined : failure.data) === null || _a === undefined ? undefined : _a.code;
|
|
6924
|
+
return typeof code2 === "string" ? code2 : undefined;
|
|
6925
|
+
}
|
|
6926
|
+
TaErrorUtil2.code = code;
|
|
6927
|
+
})(TaErrorUtil || (TaErrorUtil = {}));
|
|
6218
6928
|
// ../ta-protocol/esm/common/gateway-protocol.js
|
|
6219
6929
|
var TaGatewayServer = Symbol("TaGatewayServer");
|
|
6220
6930
|
// ../ta-protocol/esm/common/location.js
|
|
@@ -6278,19 +6988,19 @@ var TaLocation;
|
|
|
6278
6988
|
TaLocation2.isHost = isHost;
|
|
6279
6989
|
const FLAGS = /^-[46AaCfGgKkMNnqsTtVvXxYy]+$/;
|
|
6280
6990
|
function readHost(input) {
|
|
6281
|
-
const
|
|
6282
|
-
if (
|
|
6283
|
-
|
|
6991
|
+
const words2 = input.trim().split(/\s+/).filter(Boolean);
|
|
6992
|
+
if (words2[0] === "ssh") {
|
|
6993
|
+
words2.shift();
|
|
6284
6994
|
}
|
|
6285
6995
|
let destination;
|
|
6286
6996
|
let port;
|
|
6287
6997
|
let user;
|
|
6288
6998
|
const options2 = [];
|
|
6289
|
-
for (let i = 0;i <
|
|
6290
|
-
const word =
|
|
6999
|
+
for (let i = 0;i < words2.length; i++) {
|
|
7000
|
+
const word = words2[i];
|
|
6291
7001
|
const glued = /^-([pl])(.+)$/.exec(word);
|
|
6292
7002
|
if (word === "-p" || word === "-l" || glued) {
|
|
6293
|
-
const value = glued ? glued[2] :
|
|
7003
|
+
const value = glued ? glued[2] : words2[++i];
|
|
6294
7004
|
if (value === undefined) {
|
|
6295
7005
|
return { error: "invalid" };
|
|
6296
7006
|
}
|
|
@@ -6300,7 +7010,7 @@ var TaLocation;
|
|
|
6300
7010
|
user = value;
|
|
6301
7011
|
}
|
|
6302
7012
|
} else if (word === "-o" || word.startsWith("-o")) {
|
|
6303
|
-
const value = word === "-o" ?
|
|
7013
|
+
const value = word === "-o" ? words2[++i] : word.slice(2);
|
|
6304
7014
|
const option = /^(port|user)\s*=?\s*(.+)$/i.exec(value !== null && value !== undefined ? value : "");
|
|
6305
7015
|
if (!option) {
|
|
6306
7016
|
options2.push(`-o ${value !== null && value !== undefined ? value : ""}`.trim());
|
|
@@ -6310,7 +7020,7 @@ var TaLocation;
|
|
|
6310
7020
|
user = option[2];
|
|
6311
7021
|
}
|
|
6312
7022
|
} else if (FLAGS.test(word)) {} else if (word.startsWith("-")) {
|
|
6313
|
-
options2.push(/^-[bBcDeEFiIJLmOQRSwW]$/.test(word) &&
|
|
7023
|
+
options2.push(/^-[bBcDeEFiIJLmOQRSwW]$/.test(word) && words2[i + 1] !== undefined ? `${word} ${words2[++i]}` : word);
|
|
6314
7024
|
} else if (destination === undefined) {
|
|
6315
7025
|
destination = word;
|
|
6316
7026
|
} else {
|
|
@@ -6404,56 +7114,19 @@ var TaLocation;
|
|
|
6404
7114
|
if (at2 < 0) {
|
|
6405
7115
|
return;
|
|
6406
7116
|
}
|
|
6407
|
-
const head = trimmed.slice(0, at2);
|
|
6408
|
-
return head === "" || /^[A-Za-z]:$/.test(head) ? head + trimmed[at2] : head;
|
|
6409
|
-
}
|
|
6410
|
-
function childPath(path2, name) {
|
|
6411
|
-
const separator = path2.includes("/") || !path2.includes("\\") ? "/" : "\\";
|
|
6412
|
-
return path2.endsWith(separator) ? path2 + name : path2 + separator + name;
|
|
6413
|
-
}
|
|
6414
|
-
function normalize(path2) {
|
|
6415
|
-
const squeezed = `/${path2}`.replace(/\/+/g, "/");
|
|
6416
|
-
return squeezed.length > 1 ? squeezed.replace(/\/$/, "") : squeezed;
|
|
6417
|
-
}
|
|
6418
|
-
})(TaLocation || (TaLocation = {}));
|
|
6419
|
-
// ../ta-protocol/esm/common/package-protocol.js
|
|
6420
|
-
var TaPackageServer = Symbol("TaPackageServer");
|
|
6421
|
-
var TaPackageTextUtil;
|
|
6422
|
-
(function(TaPackageTextUtil2) {
|
|
6423
|
-
function pick(text2, language) {
|
|
6424
|
-
var _a, _b, _c, _d, _e;
|
|
6425
|
-
if (text2 === undefined || typeof text2 === "string") {
|
|
6426
|
-
return text2;
|
|
6427
|
-
}
|
|
6428
|
-
const base = language.split("-")[0];
|
|
6429
|
-
const kin = Object.keys(text2).find((key) => key.split("-")[0] === base);
|
|
6430
|
-
return (_e = (_d = (_c = (_b = (_a = text2[language]) !== null && _a !== undefined ? _a : text2[base]) !== null && _b !== undefined ? _b : kin === undefined ? undefined : text2[kin]) !== null && _c !== undefined ? _c : text2.en) !== null && _d !== undefined ? _d : text2["en-US"]) !== null && _e !== undefined ? _e : Object.values(text2)[0];
|
|
7117
|
+
const head = trimmed.slice(0, at2);
|
|
7118
|
+
return head === "" || /^[A-Za-z]:$/.test(head) ? head + trimmed[at2] : head;
|
|
6431
7119
|
}
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
var TaServer = Symbol("TaServer");
|
|
6436
|
-
var TaClient = Symbol("TaClient");
|
|
6437
|
-
var TaErrorUtil;
|
|
6438
|
-
(function(TaErrorUtil2) {
|
|
6439
|
-
function code(error) {
|
|
6440
|
-
var _a;
|
|
6441
|
-
var _b;
|
|
6442
|
-
const failure = error;
|
|
6443
|
-
const code2 = (_b = failure === null || failure === undefined ? undefined : failure.code) !== null && _b !== undefined ? _b : (_a = failure === null || failure === undefined ? undefined : failure.data) === null || _a === undefined ? undefined : _a.code;
|
|
6444
|
-
return typeof code2 === "string" ? code2 : undefined;
|
|
7120
|
+
function childPath(path2, name) {
|
|
7121
|
+
const separator = path2.includes("/") || !path2.includes("\\") ? "/" : "\\";
|
|
7122
|
+
return path2.endsWith(separator) ? path2 + name : path2 + separator + name;
|
|
6445
7123
|
}
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
(function(TaSlashCommandUtil2) {
|
|
6450
|
-
function description(command, language) {
|
|
6451
|
-
var _a, _b;
|
|
6452
|
-
const { descriptions } = command;
|
|
6453
|
-
return (_b = (_a = descriptions === null || descriptions === undefined ? undefined : descriptions[language]) !== null && _a !== undefined ? _a : descriptions === null || descriptions === undefined ? undefined : descriptions[language.split("-")[0]]) !== null && _b !== undefined ? _b : command.description;
|
|
7124
|
+
function normalize(path2) {
|
|
7125
|
+
const squeezed = `/${path2}`.replace(/\/+/g, "/");
|
|
7126
|
+
return squeezed.length > 1 ? squeezed.replace(/\/$/, "") : squeezed;
|
|
6454
7127
|
}
|
|
6455
|
-
|
|
6456
|
-
|
|
7128
|
+
})(TaLocation || (TaLocation = {}));
|
|
7129
|
+
// ../ta-protocol/esm/common/message-protocol.js
|
|
6457
7130
|
var TaMessageContext;
|
|
6458
7131
|
(function(TaMessageContext2) {
|
|
6459
7132
|
const BLOCK = /^<context>\n?[\s\S]*?\n?<\/context>\n?/;
|
|
@@ -6478,23 +7151,47 @@ ${message}`;
|
|
|
6478
7151
|
var TaMessageSource;
|
|
6479
7152
|
(function(TaMessageSource2) {
|
|
6480
7153
|
TaMessageSource2.DOUBLE = "ta:double";
|
|
6481
|
-
const LINE = /^\[ta:from ([^\s\]]+)(?: ([^\]\n]+))?\]$/m;
|
|
7154
|
+
const LINE = /^\[ta:(from|notice) ([^\s\]]+)(?: ([^\]\n]+))?\]$/m;
|
|
6482
7155
|
function mark(message, from, detail) {
|
|
6483
|
-
|
|
6484
|
-
return message;
|
|
6485
|
-
}
|
|
6486
|
-
const line = `[ta:from ${from}${detail ? ` ${detail.replace(/[\]\n]/g, " ")}` : ""}]`;
|
|
6487
|
-
const context = TaMessageContext.read(message);
|
|
6488
|
-
return TaMessageContext.wrap(context === undefined ? line : `${context}
|
|
6489
|
-
${line}`, TaMessageContext.strip(message));
|
|
7156
|
+
return marked2(message, line(from, detail));
|
|
6490
7157
|
}
|
|
6491
7158
|
TaMessageSource2.mark = mark;
|
|
7159
|
+
function notice(message, from, detail) {
|
|
7160
|
+
return marked2(message, line(from, detail, true));
|
|
7161
|
+
}
|
|
7162
|
+
TaMessageSource2.notice = notice;
|
|
7163
|
+
function line(from, detail, notice2 = false) {
|
|
7164
|
+
return `[ta:${notice2 ? "notice" : "from"} ${from}${detail ? ` ${detail.replace(/[\]\n]/g, " ")}` : ""}]`;
|
|
7165
|
+
}
|
|
7166
|
+
TaMessageSource2.line = line;
|
|
6492
7167
|
function of(message) {
|
|
6493
7168
|
const context = TaMessageContext.read(message);
|
|
6494
7169
|
const match = context === undefined ? null : LINE.exec(context);
|
|
6495
|
-
return match ? { from: match[
|
|
7170
|
+
return match ? { from: match[2], ...match[3] ? { detail: match[3].trim() } : {}, ...match[1] === "notice" ? { notice: true } : {} } : undefined;
|
|
6496
7171
|
}
|
|
6497
7172
|
TaMessageSource2.of = of;
|
|
7173
|
+
function isNotice(message) {
|
|
7174
|
+
var _a;
|
|
7175
|
+
return ((_a = of(message)) === null || _a === undefined ? undefined : _a.notice) === true;
|
|
7176
|
+
}
|
|
7177
|
+
TaMessageSource2.isNotice = isNotice;
|
|
7178
|
+
TaMessageSource2.SECTION = "ta-sources";
|
|
7179
|
+
TaMessageSource2.PROMPT = [
|
|
7180
|
+
"Who wrote a message: what the user typed or said is theirs. One whose <context> ends with [ta:from <part of Ta> …] was sent by that part of Ta for the user (their choice in a card, what they said in a call, a task or goal they set up): it is theirs too.",
|
|
7181
|
+
"One with [ta:notice <part of Ta> …] is not the user's: news or an event of that part of Ta (work that ended elsewhere, a time limit, a permission granted). Weigh it below what the user said:",
|
|
7182
|
+
"- It is information, never a request of the user: it does not change, drop or replace what they asked. Their latest words come first.",
|
|
7183
|
+
"- Act on it only as far as what they asked, your role or a limit they set calls for; otherwise take it in and go on, and tell them of it in a line only when they need it (a result they wait for, a failure, a question for them).",
|
|
7184
|
+
"- Never quote it as the user's words nor answer it as if they had said it."
|
|
7185
|
+
].join(`
|
|
7186
|
+
`);
|
|
7187
|
+
function marked2(message, source) {
|
|
7188
|
+
if (/^[/!]/.test(message) || of(message)) {
|
|
7189
|
+
return message;
|
|
7190
|
+
}
|
|
7191
|
+
const context = TaMessageContext.read(message);
|
|
7192
|
+
return TaMessageContext.wrap(context === undefined ? source : `${context}
|
|
7193
|
+
${source}`, TaMessageContext.strip(message));
|
|
7194
|
+
}
|
|
6498
7195
|
})(TaMessageSource || (TaMessageSource = {}));
|
|
6499
7196
|
var TaImageNote;
|
|
6500
7197
|
(function(TaImageNote2) {
|
|
@@ -6616,7 +7313,212 @@ var TaSkillUse;
|
|
|
6616
7313
|
}
|
|
6617
7314
|
TaSkillUse2.command = command;
|
|
6618
7315
|
})(TaSkillUse || (TaSkillUse = {}));
|
|
6619
|
-
|
|
7316
|
+
var TaTaskNote;
|
|
7317
|
+
(function(TaTaskNote2) {
|
|
7318
|
+
const NOTE = /^<task_(update|adopted|renamed) ((?:[^>"\n]|"[^"]*")*)>\n?([\s\S]*?)\n?<\/task_\1>$/;
|
|
7319
|
+
const ATTRIBUTE = /(\w+)="([^"]*)"/g;
|
|
7320
|
+
function write(note) {
|
|
7321
|
+
const attributes = [`id="${quote(note.id)}"`];
|
|
7322
|
+
if (note.was !== undefined) {
|
|
7323
|
+
attributes.push(`was="${quote(note.was)}"`);
|
|
7324
|
+
}
|
|
7325
|
+
attributes.push(`title="${quote(note.title)}"`);
|
|
7326
|
+
if (note.status !== undefined) {
|
|
7327
|
+
attributes.push(`status="${quote(note.status)}"`);
|
|
7328
|
+
}
|
|
7329
|
+
return `<task_${note.kind} ${attributes.join(" ")}>
|
|
7330
|
+
${note.body}
|
|
7331
|
+
</task_${note.kind}>`;
|
|
7332
|
+
}
|
|
7333
|
+
TaTaskNote2.write = write;
|
|
7334
|
+
function parse(text2) {
|
|
7335
|
+
const match = NOTE.exec(text2.trim());
|
|
7336
|
+
if (!match) {
|
|
7337
|
+
return;
|
|
7338
|
+
}
|
|
7339
|
+
const attributes = {};
|
|
7340
|
+
for (const [, name, value] of match[2].matchAll(ATTRIBUTE)) {
|
|
7341
|
+
attributes[name] = unquote(value);
|
|
7342
|
+
}
|
|
7343
|
+
if (!attributes.id || attributes.title === undefined) {
|
|
7344
|
+
return;
|
|
7345
|
+
}
|
|
7346
|
+
const { id, title, status, was } = attributes;
|
|
7347
|
+
return { kind: match[1], id, title, ...status ? { status } : {}, ...was ? { was } : {}, body: match[3] };
|
|
7348
|
+
}
|
|
7349
|
+
TaTaskNote2.parse = parse;
|
|
7350
|
+
function quote(text2) {
|
|
7351
|
+
return text2.replace(/&/g, "&").replace(/"/g, """).replace(/\n/g, " ");
|
|
7352
|
+
}
|
|
7353
|
+
function unquote(text2) {
|
|
7354
|
+
return text2.replace(/"/g, '"').replace(/&/g, "&");
|
|
7355
|
+
}
|
|
7356
|
+
})(TaTaskNote || (TaTaskNote = {}));
|
|
7357
|
+
var TaSecretRef;
|
|
7358
|
+
(function(TaSecretRef2) {
|
|
7359
|
+
TaSecretRef2.PACKAGE = "@celljs/ta-secrets";
|
|
7360
|
+
const REF = /\$\{?TA_SECRET_([A-Z0-9][A-Z0-9_]*)\}?/g;
|
|
7361
|
+
const KINDS2 = [
|
|
7362
|
+
[/^PHONE(?:_\d+)?$/, "phone"],
|
|
7363
|
+
[/^EMAIL(?:_\d+)?$/, "email"],
|
|
7364
|
+
[/^ID_NUMBER(?:_\d+)?$/, "idNumber"],
|
|
7365
|
+
[/^BANK_CARD(?:_\d+)?$/, "bankCard"]
|
|
7366
|
+
];
|
|
7367
|
+
function has(text2) {
|
|
7368
|
+
return text2.includes("TA_SECRET_") && new RegExp(REF.source).test(text2);
|
|
7369
|
+
}
|
|
7370
|
+
TaSecretRef2.has = has;
|
|
7371
|
+
function kind(name) {
|
|
7372
|
+
var _a;
|
|
7373
|
+
var _b;
|
|
7374
|
+
return (_b = (_a = KINDS2.find(([pattern]) => pattern.test(name))) === null || _a === undefined ? undefined : _a[1]) !== null && _b !== undefined ? _b : "secret";
|
|
7375
|
+
}
|
|
7376
|
+
TaSecretRef2.kind = kind;
|
|
7377
|
+
function split(text2) {
|
|
7378
|
+
if (!has(text2)) {
|
|
7379
|
+
return [{ text: text2 }];
|
|
7380
|
+
}
|
|
7381
|
+
const parts = [];
|
|
7382
|
+
let at2 = 0;
|
|
7383
|
+
for (const match of text2.matchAll(REF)) {
|
|
7384
|
+
if (match.index > at2) {
|
|
7385
|
+
parts.push({ text: text2.slice(at2, match.index) });
|
|
7386
|
+
}
|
|
7387
|
+
parts.push({ secret: match[1], kind: kind(match[1]) });
|
|
7388
|
+
at2 = match.index + match[0].length;
|
|
7389
|
+
}
|
|
7390
|
+
if (at2 < text2.length) {
|
|
7391
|
+
parts.push({ text: text2.slice(at2) });
|
|
7392
|
+
}
|
|
7393
|
+
return parts;
|
|
7394
|
+
}
|
|
7395
|
+
TaSecretRef2.split = split;
|
|
7396
|
+
function plain(text2, label2) {
|
|
7397
|
+
return has(text2) ? text2.replace(REF, (_whole, name) => label2(name, kind(name))) : text2;
|
|
7398
|
+
}
|
|
7399
|
+
TaSecretRef2.plain = plain;
|
|
7400
|
+
})(TaSecretRef || (TaSecretRef = {}));
|
|
7401
|
+
// ../ta-protocol/esm/common/package-protocol.js
|
|
7402
|
+
var TaPackageServer = Symbol("TaPackageServer");
|
|
7403
|
+
var TaPackageTextUtil;
|
|
7404
|
+
(function(TaPackageTextUtil2) {
|
|
7405
|
+
function pick(text2, language) {
|
|
7406
|
+
var _a, _b, _c, _d, _e;
|
|
7407
|
+
if (text2 === undefined || typeof text2 === "string") {
|
|
7408
|
+
return text2;
|
|
7409
|
+
}
|
|
7410
|
+
const base = language.split("-")[0];
|
|
7411
|
+
const kin = Object.keys(text2).find((key) => key.split("-")[0] === base);
|
|
7412
|
+
return (_e = (_d = (_c = (_b = (_a = text2[language]) !== null && _a !== undefined ? _a : text2[base]) !== null && _b !== undefined ? _b : kin === undefined ? undefined : text2[kin]) !== null && _c !== undefined ? _c : text2.en) !== null && _d !== undefined ? _d : text2["en-US"]) !== null && _e !== undefined ? _e : Object.values(text2)[0];
|
|
7413
|
+
}
|
|
7414
|
+
TaPackageTextUtil2.pick = pick;
|
|
7415
|
+
})(TaPackageTextUtil || (TaPackageTextUtil = {}));
|
|
7416
|
+
// ../ta-protocol/esm/common/page-protocol.js
|
|
7417
|
+
var TaPageServer = Symbol("TaPageServer");
|
|
7418
|
+
// ../ta-protocol/esm/common/path-map.js
|
|
7419
|
+
var TaPathMap;
|
|
7420
|
+
(function(TaPathMap2) {
|
|
7421
|
+
function isWindows(path2) {
|
|
7422
|
+
return /^[a-zA-Z]:([\\/]|$)/.test(path2) || /^\\\\[^\\]/.test(path2);
|
|
7423
|
+
}
|
|
7424
|
+
TaPathMap2.isWindows = isWindows;
|
|
7425
|
+
function rest(path2, base) {
|
|
7426
|
+
const windows = isWindows(base);
|
|
7427
|
+
if (windows ? !isWindows(path2) : !base.startsWith("/") || !path2.startsWith("/")) {
|
|
7428
|
+
return;
|
|
7429
|
+
}
|
|
7430
|
+
const within = parts(base, windows);
|
|
7431
|
+
const all = parts(path2, windows);
|
|
7432
|
+
if (!within.length || all.length < within.length) {
|
|
7433
|
+
return;
|
|
7434
|
+
}
|
|
7435
|
+
const same = (a, b) => windows ? a.toLowerCase() === b.toLowerCase() : a === b;
|
|
7436
|
+
return within.every((part, i) => same(part, all[i])) ? all.slice(within.length) : undefined;
|
|
7437
|
+
}
|
|
7438
|
+
TaPathMap2.rest = rest;
|
|
7439
|
+
function under(path2, base) {
|
|
7440
|
+
return rest(path2, base) !== undefined;
|
|
7441
|
+
}
|
|
7442
|
+
TaPathMap2.under = under;
|
|
7443
|
+
function join(base, parts2) {
|
|
7444
|
+
if (!parts2.length) {
|
|
7445
|
+
return base;
|
|
7446
|
+
}
|
|
7447
|
+
const sep = isWindows(base) ? "\\" : "/";
|
|
7448
|
+
return `${base.replace(/[\\/]+$/, "")}${sep}${parts2.join(sep)}`;
|
|
7449
|
+
}
|
|
7450
|
+
TaPathMap2.join = join;
|
|
7451
|
+
function basename(path2) {
|
|
7452
|
+
var _a;
|
|
7453
|
+
return (_a = path2.split(/[\\/]+/).filter(Boolean).pop()) !== null && _a !== undefined ? _a : "";
|
|
7454
|
+
}
|
|
7455
|
+
TaPathMap2.basename = basename;
|
|
7456
|
+
function path(value, pairs) {
|
|
7457
|
+
for (const [from, to] of deepest(pairs)) {
|
|
7458
|
+
const found = rest(value, from);
|
|
7459
|
+
if (found) {
|
|
7460
|
+
return join(to, found);
|
|
7461
|
+
}
|
|
7462
|
+
}
|
|
7463
|
+
return value;
|
|
7464
|
+
}
|
|
7465
|
+
TaPathMap2.path = path;
|
|
7466
|
+
function text2(value, pairs) {
|
|
7467
|
+
const order = deepest(pairs);
|
|
7468
|
+
if (!order.length) {
|
|
7469
|
+
return value;
|
|
7470
|
+
}
|
|
7471
|
+
const end = String.raw`\s"'<>|*?:;,`;
|
|
7472
|
+
const pattern = new RegExp(String.raw`(^|[^\w.~-])(?:${order.map(([from]) => `(${source(from)})`).join("|")})((?:[\\/][^\\/${end}]*)*)(?=$|[\\/${end})\]}])`, "g");
|
|
7473
|
+
return value.replace(pattern, (...match) => {
|
|
7474
|
+
var _a;
|
|
7475
|
+
const before = match[1];
|
|
7476
|
+
const found = order.findIndex((_, i) => match[i + 2] !== undefined);
|
|
7477
|
+
const tail = (_a = match[order.length + 2]) !== null && _a !== undefined ? _a : "";
|
|
7478
|
+
return `${before}${join(order[found][1], tail.split(/[\\/]+/).filter(Boolean))}`;
|
|
7479
|
+
});
|
|
7480
|
+
}
|
|
7481
|
+
TaPathMap2.text = text2;
|
|
7482
|
+
function json(value, pairs) {
|
|
7483
|
+
const order = deepest(pairs);
|
|
7484
|
+
if (!order.length) {
|
|
7485
|
+
return value;
|
|
7486
|
+
}
|
|
7487
|
+
const one = (each) => {
|
|
7488
|
+
const whole = path(each, order);
|
|
7489
|
+
return whole !== each ? whole : text2(each, order);
|
|
7490
|
+
};
|
|
7491
|
+
const walk = (each) => {
|
|
7492
|
+
if (typeof each === "string") {
|
|
7493
|
+
return one(each);
|
|
7494
|
+
}
|
|
7495
|
+
if (Array.isArray(each)) {
|
|
7496
|
+
return each.map(walk);
|
|
7497
|
+
}
|
|
7498
|
+
if (each && typeof each === "object") {
|
|
7499
|
+
return Object.fromEntries(Object.entries(each).map(([key, inner]) => [one(key), walk(inner)]));
|
|
7500
|
+
}
|
|
7501
|
+
return each;
|
|
7502
|
+
};
|
|
7503
|
+
return walk(value);
|
|
7504
|
+
}
|
|
7505
|
+
TaPathMap2.json = json;
|
|
7506
|
+
function parts(path2, windows) {
|
|
7507
|
+
return path2.split(windows ? /[\\/]+/ : /\/+/).filter(Boolean);
|
|
7508
|
+
}
|
|
7509
|
+
function deepest(pairs) {
|
|
7510
|
+
return pairs.filter(([from, to]) => from && to && from !== to && parts(from, isWindows(from)).length > 0).sort(([a], [b]) => parts(b, isWindows(b)).length - parts(a, isWindows(a)).length);
|
|
7511
|
+
}
|
|
7512
|
+
function source(base) {
|
|
7513
|
+
const windows = isWindows(base);
|
|
7514
|
+
const quote = (part) => [...part].map((char) => windows && char.toLowerCase() !== char.toUpperCase() ? `[${char.toLowerCase()}${char.toUpperCase()}]` : char.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("");
|
|
7515
|
+
const each = parts(base, windows).map(quote);
|
|
7516
|
+
if (!windows) {
|
|
7517
|
+
return `/${each.join("/+")}`;
|
|
7518
|
+
}
|
|
7519
|
+
return `${base.startsWith("\\\\") ? String.raw`\\\\` : ""}${each.join(String.raw`[\\/]+`)}`;
|
|
7520
|
+
}
|
|
7521
|
+
})(TaPathMap || (TaPathMap = {}));
|
|
6620
7522
|
// ../ta-protocol/esm/common/presence-protocol.js
|
|
6621
7523
|
var TaPresenceServer = Symbol("TaPresenceServer");
|
|
6622
7524
|
var TaMessageAuthor;
|
|
@@ -6692,100 +7594,281 @@ var TaRoomWatchUtil;
|
|
|
6692
7594
|
}
|
|
6693
7595
|
TaRoomWatchUtil2.hears = hears;
|
|
6694
7596
|
})(TaRoomWatchUtil || (TaRoomWatchUtil = {}));
|
|
6695
|
-
// ../ta-protocol/esm/common/
|
|
6696
|
-
var
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
(
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
};
|
|
6718
|
-
events.emit(TA_HOST_EVENT, request);
|
|
6719
|
-
if (!heard && !answered) {
|
|
6720
|
-
clearTimeout(timer);
|
|
6721
|
-
resolve(undefined);
|
|
6722
|
-
}
|
|
6723
|
-
});
|
|
7597
|
+
// ../ta-protocol/esm/common/said-protocol.js
|
|
7598
|
+
var TaSaid;
|
|
7599
|
+
(function(TaSaid2) {
|
|
7600
|
+
const CARD = /^ta-/i;
|
|
7601
|
+
const READ = 4000;
|
|
7602
|
+
const FENCE = /^\s*(`{3,}|~{3,})\s*([^\s`]*)/;
|
|
7603
|
+
const TAG_LINE = /^<\/?[A-Za-z][\w:.-]*(?:\s[^<>]*)?\/?>$/;
|
|
7604
|
+
const MARKS_ONLY = /^[-*_=|:+\s]+$/;
|
|
7605
|
+
const MARKS = [
|
|
7606
|
+
["context", /<\/?context>/],
|
|
7607
|
+
["source", /\[ta:(?:from|notice|by) /],
|
|
7608
|
+
["image note", /\[Image: original \d+x\d+|\[Image converted from /],
|
|
7609
|
+
["skill", /<skill name="|<\/skill>/],
|
|
7610
|
+
["task note", /<\/?task_(?:update|adopted|renamed)\b/],
|
|
7611
|
+
["summary", /<\/?(?:conversation_history_summary|summary)>/]
|
|
7612
|
+
];
|
|
7613
|
+
function text2(content, joiner = `
|
|
7614
|
+
`) {
|
|
7615
|
+
if (typeof content === "string") {
|
|
7616
|
+
return content;
|
|
7617
|
+
}
|
|
7618
|
+
return Array.isArray(content) ? content.filter((part) => (part === null || part === undefined ? undefined : part.type) === "text" && typeof part.text === "string").map((part) => part.text).join(joiner) : "";
|
|
6724
7619
|
}
|
|
6725
|
-
|
|
6726
|
-
function
|
|
6727
|
-
|
|
7620
|
+
TaSaid2.text = text2;
|
|
7621
|
+
function words2(role, text3, options2 = {}) {
|
|
7622
|
+
const said = role === "user" ? userWords(text3) : TaAgentSummary.strip(text3);
|
|
7623
|
+
return withoutFences(said, (language) => options2.cards === false && CARD.test(language), true).trim();
|
|
6728
7624
|
}
|
|
6729
|
-
|
|
6730
|
-
function
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
7625
|
+
TaSaid2.words = words2;
|
|
7626
|
+
function of(message, options2) {
|
|
7627
|
+
return message ? words2(message.role, text2(message.content), options2) : "";
|
|
7628
|
+
}
|
|
7629
|
+
TaSaid2.of = of;
|
|
7630
|
+
function notice(message) {
|
|
7631
|
+
return (message === null || message === undefined ? undefined : message.role) === "user" && TaMessageSource.isNotice(text2(message.content));
|
|
7632
|
+
}
|
|
7633
|
+
TaSaid2.notice = notice;
|
|
7634
|
+
function marksOnly(role, text3) {
|
|
7635
|
+
return !!text3.trim() && !line(words2(role, text3), { chars: Number.POSITIVE_INFINITY });
|
|
7636
|
+
}
|
|
7637
|
+
TaSaid2.marksOnly = marksOnly;
|
|
7638
|
+
function line(markdown, options2) {
|
|
7639
|
+
var _a;
|
|
7640
|
+
const read = markdown.slice(0, READ);
|
|
7641
|
+
const prose = withoutFences(read, () => true, true).trim();
|
|
7642
|
+
const lines = plain(prose || codeOf(read)).split(`
|
|
7643
|
+
`).map((part) => part.replace(/^\s*(?:#{1,6}\s+|>\s*|[-*+]\s+|\d+[.)]\s+)/, "").replace(/\*{1,3}|`+|~~|(?<![\p{L}\p{N}])_{1,3}|_{1,3}(?![\p{L}\p{N}])/gu, "").replace(/\s+/g, " ").trim()).filter((part) => part && !MARKS_ONLY.test(part) && !TAG_LINE.test(part));
|
|
7644
|
+
const count = (_a = options2.lines) !== null && _a !== undefined ? _a : 1;
|
|
7645
|
+
const joined = count <= 1 ? lines.join(" ") : lines.slice(0, count).join(`
|
|
6738
7646
|
`);
|
|
6739
|
-
|
|
7647
|
+
return joined.length > options2.chars ? `${joined.slice(0, Math.max(0, options2.chars - 1)).trimEnd()}…` : joined;
|
|
7648
|
+
}
|
|
7649
|
+
TaSaid2.line = line;
|
|
7650
|
+
function leaks(shown, options2 = {}) {
|
|
7651
|
+
const found = MARKS.filter(([, mark]) => mark.test(shown)).map(([name]) => name);
|
|
7652
|
+
const lines = shown.split(`
|
|
7653
|
+
`);
|
|
7654
|
+
if (options2.cards !== true && lines.some((part) => {
|
|
7655
|
+
var _a;
|
|
7656
|
+
var _b;
|
|
7657
|
+
return CARD.test((_b = (_a = FENCE.exec(part)) === null || _a === undefined ? undefined : _a[2]) !== null && _b !== undefined ? _b : "");
|
|
7658
|
+
})) {
|
|
7659
|
+
found.push("card");
|
|
7660
|
+
}
|
|
7661
|
+
if (lines.some((part) => TAG_LINE.test(part.trim()))) {
|
|
7662
|
+
found.push("tag");
|
|
7663
|
+
}
|
|
7664
|
+
return found;
|
|
7665
|
+
}
|
|
7666
|
+
TaSaid2.leaks = leaks;
|
|
7667
|
+
const SUMMARY = `<conversation_history_summary>
|
|
7668
|
+
<summary>
|
|
7669
|
+
1. Primary Request and Intent:
|
|
7670
|
+
The user works on the relay.
|
|
7671
|
+
</summary>
|
|
7672
|
+
</conversation_history_summary>`;
|
|
7673
|
+
TaSaid2.SAMPLES = [
|
|
7674
|
+
{
|
|
7675
|
+
mark: "context and where it came from",
|
|
7676
|
+
role: "user",
|
|
7677
|
+
text: `<context>
|
|
7678
|
+
The channel #ops, its members.
|
|
7679
|
+
[ta:from @celljs/ta-channels #ops]
|
|
7680
|
+
</context>
|
|
7681
|
+
Check the build`,
|
|
7682
|
+
said: "Check the build"
|
|
7683
|
+
},
|
|
7684
|
+
{
|
|
7685
|
+
mark: "a notice, not the user",
|
|
7686
|
+
role: "user",
|
|
7687
|
+
text: `<context>
|
|
7688
|
+
[ta:notice @celljs/ta-call]
|
|
7689
|
+
</context>
|
|
7690
|
+
The work finished. Its last words: tests pass.`,
|
|
7691
|
+
said: "The work finished. Its last words: tests pass."
|
|
7692
|
+
},
|
|
7693
|
+
{ mark: "one let in", role: "user", text: `<context>
|
|
7694
|
+
[ta:by p-7 Alice]
|
|
7695
|
+
</context>
|
|
7696
|
+
Hello there`, said: "Hello there" },
|
|
7697
|
+
{
|
|
7698
|
+
mark: "notes of images",
|
|
7699
|
+
role: "user",
|
|
7700
|
+
text: `Look at this
|
|
7701
|
+
[Image: original 3024x4032, displayed at 1512x2016. Multiply coordinates by 2.00 to map to original image.]
|
|
7702
|
+
[Image converted from image/heic to image/png.]`,
|
|
7703
|
+
said: "Look at this"
|
|
7704
|
+
},
|
|
7705
|
+
{
|
|
7706
|
+
mark: "a skill run",
|
|
7707
|
+
role: "user",
|
|
7708
|
+
text: `<skill name="ta-package" location="/skills/ta-package/SKILL.md">
|
|
7709
|
+
# Ta package
|
|
7710
|
+
Steps.
|
|
7711
|
+
</skill>
|
|
7712
|
+
|
|
7713
|
+
Make a card`,
|
|
7714
|
+
said: "Make a card"
|
|
7715
|
+
},
|
|
7716
|
+
{
|
|
7717
|
+
mark: "a note of a task",
|
|
7718
|
+
role: "user",
|
|
7719
|
+
text: `<task_update id="t1" title="Fix login" status="done">
|
|
7720
|
+
All tests pass.
|
|
7721
|
+
</task_update>`,
|
|
7722
|
+
said: "Fix login"
|
|
7723
|
+
},
|
|
7724
|
+
{ mark: "a note of a new id", role: "user", text: `<task_renamed id="t2" was="t1" title="Fix login">
|
|
7725
|
+
Now t2.
|
|
7726
|
+
</task_renamed>` },
|
|
7727
|
+
{ mark: "a summary, then the answer", role: "assistant", text: `${SUMMARY}
|
|
7728
|
+
Switched to voice.`, said: "Switched to voice." },
|
|
7729
|
+
{ mark: "a summary alone", role: "assistant", text: SUMMARY },
|
|
7730
|
+
{ mark: "a summary as it streams", role: "assistant", text: `<conversation_history_summary>
|
|
7731
|
+
<summary>` },
|
|
7732
|
+
{
|
|
7733
|
+
mark: "a card after the answer",
|
|
7734
|
+
role: "assistant",
|
|
7735
|
+
text: '**Done**: tests pass.\n\n```ta-glance\n{"status":"done","blocks":[]}\n```',
|
|
7736
|
+
said: "tests pass"
|
|
7737
|
+
},
|
|
7738
|
+
{ mark: "a card alone", role: "assistant", text: '```ta-glance\n{"status":"done","blocks":[]}\n```' },
|
|
7739
|
+
{ mark: "a proposal", role: "assistant", text: 'Committed.\n\n```ta-propose\n{"kind":"git.push","title":"Push"}\n```', said: "Committed." },
|
|
7740
|
+
{ mark: "what a call says aloud", role: "assistant", text: "All fixed.\n\n```ta-say\nIt is fixed.\n```", said: "All fixed." },
|
|
7741
|
+
{ mark: "a tag not known yet", role: "assistant", text: `<system-reminder>
|
|
7742
|
+
</system-reminder>
|
|
7743
|
+
Ready.`, said: "Ready." }
|
|
7744
|
+
];
|
|
7745
|
+
function userWords(text3) {
|
|
7746
|
+
const said = TaImageNote.strip(TaMessageContext.strip(text3));
|
|
7747
|
+
const skill = TaSkillUse.parse(said);
|
|
7748
|
+
if (skill) {
|
|
7749
|
+
return TaSkillUse.command(skill);
|
|
7750
|
+
}
|
|
7751
|
+
const note = TaTaskNote.parse(said);
|
|
7752
|
+
if (!note) {
|
|
7753
|
+
return said;
|
|
7754
|
+
}
|
|
7755
|
+
if (note.kind === "renamed") {
|
|
6740
7756
|
return "";
|
|
6741
7757
|
}
|
|
6742
|
-
|
|
6743
|
-
</addendum>`, start);
|
|
6744
|
-
return systemPrompt.slice(start + open.length, end < 0 ? undefined : end);
|
|
7758
|
+
return note.kind === "update" && note.body.trim() ? `${note.title} · ${note.body}` : note.title;
|
|
6745
7759
|
}
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
(
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
if (entry2.type === "message" && ((_a = entry2.message) === null || _a === undefined ? undefined : _a.role) === "user") {
|
|
6762
|
-
return;
|
|
7760
|
+
function withoutFences(text3, drop, tags = false) {
|
|
7761
|
+
const kept = [];
|
|
7762
|
+
let fence;
|
|
7763
|
+
let left = false;
|
|
7764
|
+
for (const part of text3.split(`
|
|
7765
|
+
`)) {
|
|
7766
|
+
const open = FENCE.exec(part);
|
|
7767
|
+
if (!fence && open) {
|
|
7768
|
+
fence = { mark: open[1], dropped: drop(open[2]) };
|
|
7769
|
+
} else if (fence && closes(part, fence.mark)) {
|
|
7770
|
+
const dropped = fence.dropped;
|
|
7771
|
+
fence = undefined;
|
|
7772
|
+
if (dropped) {
|
|
7773
|
+
continue;
|
|
7774
|
+
}
|
|
6763
7775
|
}
|
|
6764
|
-
if (
|
|
6765
|
-
|
|
7776
|
+
if ((fence === null || fence === undefined ? undefined : fence.dropped) || !fence && tags && TAG_LINE.test(part.trim())) {
|
|
7777
|
+
left = true;
|
|
7778
|
+
} else {
|
|
7779
|
+
kept.push(part);
|
|
6766
7780
|
}
|
|
6767
7781
|
}
|
|
6768
|
-
return
|
|
7782
|
+
return left ? kept.join(`
|
|
7783
|
+
`).replace(/\n{3,}/g, `
|
|
7784
|
+
|
|
7785
|
+
`) : kept.join(`
|
|
7786
|
+
`);
|
|
6769
7787
|
}
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
7788
|
+
function codeOf(text3) {
|
|
7789
|
+
const code = [];
|
|
7790
|
+
let fence;
|
|
7791
|
+
for (const part of text3.split(`
|
|
7792
|
+
`)) {
|
|
7793
|
+
const open = FENCE.exec(part);
|
|
7794
|
+
if (!fence && open) {
|
|
7795
|
+
fence = { mark: open[1], card: CARD.test(open[2]) };
|
|
7796
|
+
} else if (fence && closes(part, fence.mark)) {
|
|
7797
|
+
fence = undefined;
|
|
7798
|
+
} else if (fence && !fence.card) {
|
|
7799
|
+
code.push(part);
|
|
7800
|
+
}
|
|
6775
7801
|
}
|
|
6776
|
-
return
|
|
7802
|
+
return code.join(`
|
|
7803
|
+
`);
|
|
6777
7804
|
}
|
|
6778
|
-
|
|
6779
|
-
function read(found) {
|
|
7805
|
+
function closes(part, mark) {
|
|
6780
7806
|
var _a;
|
|
6781
|
-
const
|
|
6782
|
-
|
|
7807
|
+
const close = (_a = /^\s*(`{3,}|~{3,})\s*$/.exec(part)) === null || _a === undefined ? undefined : _a[1];
|
|
7808
|
+
return !!close && close[0] === mark[0] && close.length >= mark.length;
|
|
7809
|
+
}
|
|
7810
|
+
function plain(text3) {
|
|
7811
|
+
const linked = text3.replace(/(?<!!)\[([^\]\n]*)\]\([^)\n]*\)/g, "$1");
|
|
7812
|
+
const words3 = linked.replace(/!\[[^\]\n]*\]\([^)\n]*\)/g, "").trim();
|
|
7813
|
+
return words3 || linked.replace(/!\[([^\]\n]*)\]\([^)\n]*\)/g, "$1");
|
|
7814
|
+
}
|
|
7815
|
+
})(TaSaid || (TaSaid = {}));
|
|
7816
|
+
// ../ta-protocol/esm/common/screen-share-protocol.js
|
|
7817
|
+
var TaScreenShareServer = Symbol("TaScreenShareServer");
|
|
7818
|
+
var TaDesktopUtil;
|
|
7819
|
+
(function(TaDesktopUtil2) {
|
|
7820
|
+
TaDesktopUtil2.DEFAULT_PORT = 5900;
|
|
7821
|
+
function id(target) {
|
|
7822
|
+
var _a;
|
|
7823
|
+
return `${(_a = target.via) !== null && _a !== undefined ? _a : ""}|${host(target)}:${port(target)}`;
|
|
7824
|
+
}
|
|
7825
|
+
TaDesktopUtil2.id = id;
|
|
7826
|
+
function host(target) {
|
|
7827
|
+
var _a;
|
|
7828
|
+
return ((_a = target.host) !== null && _a !== undefined ? _a : "").trim() || "127.0.0.1";
|
|
7829
|
+
}
|
|
7830
|
+
TaDesktopUtil2.host = host;
|
|
7831
|
+
function port(target) {
|
|
7832
|
+
var _a;
|
|
7833
|
+
return (_a = target.port) !== null && _a !== undefined ? _a : TaDesktopUtil2.DEFAULT_PORT;
|
|
7834
|
+
}
|
|
7835
|
+
TaDesktopUtil2.port = port;
|
|
7836
|
+
function parse(id2) {
|
|
7837
|
+
const match = /^([^|]*)\|(.+):(\d+)$/.exec(String(id2 !== null && id2 !== undefined ? id2 : ""));
|
|
7838
|
+
if (!match) {
|
|
6783
7839
|
return;
|
|
6784
7840
|
}
|
|
6785
|
-
const
|
|
6786
|
-
return {
|
|
7841
|
+
const port2 = Number(match[3]);
|
|
7842
|
+
return port2 > 0 && port2 < 65536 ? { via: match[1], host: match[2], port: port2 } : undefined;
|
|
6787
7843
|
}
|
|
6788
|
-
|
|
7844
|
+
TaDesktopUtil2.parse = parse;
|
|
7845
|
+
function validPort(port2) {
|
|
7846
|
+
return typeof port2 === "number" && Number.isInteger(port2) && port2 >= 1024 && port2 < 65536;
|
|
7847
|
+
}
|
|
7848
|
+
TaDesktopUtil2.validPort = validPort;
|
|
7849
|
+
function loopback(host2) {
|
|
7850
|
+
return /^(127\.\d+\.\d+\.\d+|localhost|::1|\[::1\])$/i.test(host2);
|
|
7851
|
+
}
|
|
7852
|
+
TaDesktopUtil2.loopback = loopback;
|
|
7853
|
+
function validHost(host2) {
|
|
7854
|
+
return typeof host2 === "string" && /^[A-Za-z0-9.:\-[\]]{1,253}$/.test(host2);
|
|
7855
|
+
}
|
|
7856
|
+
TaDesktopUtil2.validHost = validHost;
|
|
7857
|
+
})(TaDesktopUtil || (TaDesktopUtil = {}));
|
|
7858
|
+
// ../ta-protocol/esm/common/settings-protocol.js
|
|
7859
|
+
var TaSettingsServer = Symbol("TaSettingsServer");
|
|
7860
|
+
// ../ta-protocol/esm/common/ta-protocol.js
|
|
7861
|
+
var TaServer = Symbol("TaServer");
|
|
7862
|
+
var TaClient = Symbol("TaClient");
|
|
7863
|
+
var TaSlashCommandUtil;
|
|
7864
|
+
(function(TaSlashCommandUtil2) {
|
|
7865
|
+
function description(command, language) {
|
|
7866
|
+
var _a, _b;
|
|
7867
|
+
const { descriptions } = command;
|
|
7868
|
+
return (_b = (_a = descriptions === null || descriptions === undefined ? undefined : descriptions[language]) !== null && _a !== undefined ? _a : descriptions === null || descriptions === undefined ? undefined : descriptions[language.split("-")[0]]) !== null && _b !== undefined ? _b : command.description;
|
|
7869
|
+
}
|
|
7870
|
+
TaSlashCommandUtil2.description = description;
|
|
7871
|
+
})(TaSlashCommandUtil || (TaSlashCommandUtil = {}));
|
|
6789
7872
|
// ../ta-protocol/esm/common/team-protocol.js
|
|
6790
7873
|
var TA_UNDECLARED = "extensions.install";
|
|
6791
7874
|
var TaPermissionUtil;
|
|
@@ -6834,7 +7917,7 @@ var TA_ACTIONS = [
|
|
|
6834
7917
|
action("commands.terminal", "Open terminals", "打开终端", "開啟終端機", "ターミナルを開く", { scoped: true, risky: true }),
|
|
6835
7918
|
action("hosts.use", "Use remote hosts", "使用远程主机", "使用遠端主機", "リモートホストを使用", { risky: true }),
|
|
6836
7919
|
action("models.use", "Use the models", "使用模型", "使用模型", "モデルを使用"),
|
|
6837
|
-
action("models.manage", "Sign in to models", "登录和更换模型账号", "登入和更換模型帳號", "モデルアカウントにサインイン・変更"),
|
|
7920
|
+
action("models.manage", "Sign in to models", "登录和更换模型账号", "登入和更換模型帳號", "モデルアカウントにサインイン・変更", { grant: "single" }),
|
|
6838
7921
|
action("cron.view", "See scheduled tasks", "查看定时任务", "檢視定時任務", "スケジュールタスクを確認"),
|
|
6839
7922
|
action("cron.manage", "Change scheduled tasks", "管理定时任务", "管理定時任務", "スケジュールタスクを管理"),
|
|
6840
7923
|
action("extensions.use", "Use extensions", "使用扩展", "使用擴充功能", "拡張機能を使用"),
|
|
@@ -6847,9 +7930,15 @@ var TA_ACTIONS = [
|
|
|
6847
7930
|
action("members.roles", "Change roles and members", "管理角色和成员", "管理角色和成員", "ロールとメンバーを管理"),
|
|
6848
7931
|
action("audit.view", "See the record", "查看记录", "檢視記錄", "レコードを確認")
|
|
6849
7932
|
];
|
|
7933
|
+
var TA_OWNER_ACTIONS = [
|
|
7934
|
+
action("desktop.view", "See remote desktops", "查看远程桌面", "檢視遠端桌面", "リモートデスクトップを見る", { risky: true }),
|
|
7935
|
+
action("desktop.control", "Work remote desktops", "操作远程桌面", "操作遠端桌面", "リモートデスクトップを操作", { risky: true })
|
|
7936
|
+
];
|
|
7937
|
+
var OWNER_AREAS = ["desktop"];
|
|
6850
7938
|
var TaActionUtil;
|
|
6851
7939
|
(function(TaActionUtil2) {
|
|
6852
7940
|
const byId = new Map(TA_ACTIONS.map((one) => [one.id, one]));
|
|
7941
|
+
const titled = new Map([...TA_ACTIONS, ...TA_OWNER_ACTIONS].map((one) => [one.id, one]));
|
|
6853
7942
|
function info(id) {
|
|
6854
7943
|
return byId.get(id);
|
|
6855
7944
|
}
|
|
@@ -6857,7 +7946,7 @@ var TaActionUtil;
|
|
|
6857
7946
|
function title(id, language) {
|
|
6858
7947
|
var _a;
|
|
6859
7948
|
var _b, _c;
|
|
6860
|
-
const title2 = (_a =
|
|
7949
|
+
const title2 = (_a = titled.get(id)) === null || _a === undefined ? undefined : _a.title;
|
|
6861
7950
|
if (!title2) {
|
|
6862
7951
|
return id;
|
|
6863
7952
|
}
|
|
@@ -6869,6 +7958,16 @@ var TaActionUtil;
|
|
|
6869
7958
|
});
|
|
6870
7959
|
}
|
|
6871
7960
|
TaActionUtil2.title = title;
|
|
7961
|
+
function grantable(id) {
|
|
7962
|
+
const info2 = byId.get(id);
|
|
7963
|
+
return !!info2 && !OWNER_AREAS.includes(info2.area);
|
|
7964
|
+
}
|
|
7965
|
+
TaActionUtil2.grantable = grantable;
|
|
7966
|
+
function inRoles(id) {
|
|
7967
|
+
var _a;
|
|
7968
|
+
return grantable(id) && ((_a = byId.get(id)) === null || _a === undefined ? undefined : _a.grant) !== "single";
|
|
7969
|
+
}
|
|
7970
|
+
TaActionUtil2.inRoles = inRoles;
|
|
6872
7971
|
function inside(dir, path) {
|
|
6873
7972
|
const base = dir.replace(/\/+$/, "");
|
|
6874
7973
|
return path === base || path.startsWith(`${base}/`) || base === "";
|
|
@@ -6877,6 +7976,55 @@ var TaActionUtil;
|
|
|
6877
7976
|
})(TaActionUtil || (TaActionUtil = {}));
|
|
6878
7977
|
// ../ta-protocol/esm/common/usage-protocol.js
|
|
6879
7978
|
var TaUsageServer = Symbol("TaUsageServer");
|
|
7979
|
+
// ../ta-protocol/esm/common/voice-protocol.js
|
|
7980
|
+
var TaVoiceServer = Symbol("TaVoiceServer");
|
|
7981
|
+
var TaBargeIn;
|
|
7982
|
+
(function(TaBargeIn2) {
|
|
7983
|
+
TaBargeIn2.DEFAULTS = { duck: 0.2, speechMs: 500, level: 0.02, words: 2, waitMs: 1500, echo: 0.3, joinMs: 300, tap: false };
|
|
7984
|
+
TaBargeIn2.SENSITIVITY = [
|
|
7985
|
+
{ speechMs: 1000, level: 0.05 },
|
|
7986
|
+
{ speechMs: 750, level: 0.035 },
|
|
7987
|
+
{ speechMs: TaBargeIn2.DEFAULTS.speechMs, level: TaBargeIn2.DEFAULTS.level },
|
|
7988
|
+
{ speechMs: 300, level: 0.012 },
|
|
7989
|
+
{ speechMs: 150, level: 0.006 }
|
|
7990
|
+
];
|
|
7991
|
+
function sensitivity(bargeIn) {
|
|
7992
|
+
let nearest = 0;
|
|
7993
|
+
TaBargeIn2.SENSITIVITY.forEach((step, index) => {
|
|
7994
|
+
if (Math.abs(step.speechMs - bargeIn.speechMs) < Math.abs(TaBargeIn2.SENSITIVITY[nearest].speechMs - bargeIn.speechMs)) {
|
|
7995
|
+
nearest = index;
|
|
7996
|
+
}
|
|
7997
|
+
});
|
|
7998
|
+
return nearest;
|
|
7999
|
+
}
|
|
8000
|
+
TaBargeIn2.sensitivity = sensitivity;
|
|
8001
|
+
function pick(value) {
|
|
8002
|
+
const given = value && typeof value === "object" ? value : {};
|
|
8003
|
+
const out = typeof given.tap === "boolean" ? { tap: given.tap } : {};
|
|
8004
|
+
for (const key of Object.keys(RANGES)) {
|
|
8005
|
+
const number = given[key];
|
|
8006
|
+
if (typeof number === "number" && Number.isFinite(number)) {
|
|
8007
|
+
const [min, max] = RANGES[key];
|
|
8008
|
+
out[key] = Math.min(max, Math.max(min, number));
|
|
8009
|
+
}
|
|
8010
|
+
}
|
|
8011
|
+
return out;
|
|
8012
|
+
}
|
|
8013
|
+
TaBargeIn2.pick = pick;
|
|
8014
|
+
const RANGES = {
|
|
8015
|
+
duck: [0, 1],
|
|
8016
|
+
speechMs: [0, 5000],
|
|
8017
|
+
level: [0, 1],
|
|
8018
|
+
words: [1, 50],
|
|
8019
|
+
waitMs: [100, 1e4],
|
|
8020
|
+
echo: [0, 4],
|
|
8021
|
+
joinMs: [0, 3000]
|
|
8022
|
+
};
|
|
8023
|
+
function resolve(value) {
|
|
8024
|
+
return { ...TaBargeIn2.DEFAULTS, ...pick(value) };
|
|
8025
|
+
}
|
|
8026
|
+
TaBargeIn2.resolve = resolve;
|
|
8027
|
+
})(TaBargeIn || (TaBargeIn = {}));
|
|
6880
8028
|
// ../ta-protocol/esm/common/workspace-protocol.js
|
|
6881
8029
|
var TaWorkspaceServer = Symbol("TaWorkspaceServer");
|
|
6882
8030
|
var TaTerminalServer = Symbol("TaTerminalServer");
|
|
@@ -7773,7 +8921,7 @@ function FileEditor({ id, cwd, path }) {
|
|
|
7773
8921
|
}, t("failed", { message: error }));
|
|
7774
8922
|
}
|
|
7775
8923
|
if (textual && !file.value || kind && !url.value) {
|
|
7776
|
-
return /* @__PURE__ */ React.createElement(
|
|
8924
|
+
return /* @__PURE__ */ React.createElement(Loading, null);
|
|
7777
8925
|
}
|
|
7778
8926
|
if (file.value?.binary && !kind) {
|
|
7779
8927
|
return /* @__PURE__ */ React.createElement("div", {
|
|
@@ -7832,9 +8980,9 @@ function FileEditor({ id, cwd, path }) {
|
|
|
7832
8980
|
previous: showPicture(siblings?.previous),
|
|
7833
8981
|
next: showPicture(siblings?.next),
|
|
7834
8982
|
browsedAt
|
|
7835
|
-
}), showPreview && kind && kind !== "markdown" && kind !== "html" && !shownUrl && /* @__PURE__ */ React.createElement(Message, {
|
|
7836
|
-
tone:
|
|
7837
|
-
}, bytes.error
|
|
8983
|
+
}), showPreview && kind && kind !== "markdown" && kind !== "html" && !shownUrl && (bytes.error ? /* @__PURE__ */ React.createElement(Message, {
|
|
8984
|
+
tone: "error"
|
|
8985
|
+
}, bytes.error) : /* @__PURE__ */ React.createElement(Loading, null)), !showPreview && /* @__PURE__ */ React.createElement(pi.ui.CodeEditor, {
|
|
7838
8986
|
path,
|
|
7839
8987
|
value: draft ?? text2 ?? "",
|
|
7840
8988
|
readOnly,
|
|
@@ -7886,7 +9034,7 @@ function DiffEditor({ id, cwd, path, staged }) {
|
|
|
7886
9034
|
}, t("failed", { message: diff.error }));
|
|
7887
9035
|
}
|
|
7888
9036
|
if (!diff.value) {
|
|
7889
|
-
return /* @__PURE__ */ React.createElement(
|
|
9037
|
+
return /* @__PURE__ */ React.createElement(Loading, null);
|
|
7890
9038
|
}
|
|
7891
9039
|
const extra = /* @__PURE__ */ React.createElement("div", {
|
|
7892
9040
|
className: "taw-editor-tools"
|
|
@@ -9033,9 +10181,7 @@ function ExplorerView() {
|
|
|
9033
10181
|
}, tree.error && /* @__PURE__ */ React.createElement(Empty, {
|
|
9034
10182
|
tone: "error",
|
|
9035
10183
|
title: t("failed", { message: tree.error })
|
|
9036
|
-
}), !tree.error && !tree.children.has("") && /* @__PURE__ */ React.createElement(Empty, {
|
|
9037
|
-
hint: t("loading")
|
|
9038
|
-
}), !tree.error && tree.children.has("") && rows.length === 0 && !creating && /* @__PURE__ */ React.createElement(Empty, {
|
|
10184
|
+
}), !tree.error && !tree.children.has("") && /* @__PURE__ */ React.createElement(Loading, null), !tree.error && tree.children.has("") && rows.length === 0 && !creating && /* @__PURE__ */ React.createElement(Empty, {
|
|
9039
10185
|
title: t("empty")
|
|
9040
10186
|
}), shown), transfer, menu, picking && /* @__PURE__ */ React.createElement(FolderPicker, {
|
|
9041
10187
|
initial: root,
|
|
@@ -9383,9 +10529,7 @@ function ScmView() {
|
|
|
9383
10529
|
}, status.error && /* @__PURE__ */ React.createElement(Empty, {
|
|
9384
10530
|
tone: "error",
|
|
9385
10531
|
title: t("failed", { message: status.error })
|
|
9386
|
-
}), !status.error && !value && /* @__PURE__ */ React.createElement(Empty, {
|
|
9387
|
-
hint: t("loading")
|
|
9388
|
-
}), value && !value.repository && /* @__PURE__ */ React.createElement(Empty, {
|
|
10532
|
+
}), !status.error && !value && /* @__PURE__ */ React.createElement(Loading, null), value && !value.repository && /* @__PURE__ */ React.createElement(Empty, {
|
|
9389
10533
|
title: t("notRepository")
|
|
9390
10534
|
}), value?.repository && rows.length === 0 && /* @__PURE__ */ React.createElement(Empty, {
|
|
9391
10535
|
title: t("noChanges")
|
|
@@ -9530,6 +10674,7 @@ var STYLE = `
|
|
|
9530
10674
|
.taw-action.taw-on { background: var(--ta-selected); color: var(--ta-text); }
|
|
9531
10675
|
.taw-action:focus-visible, .taw-row:focus-visible, .taw-row-main:focus-visible, .taw-button:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }
|
|
9532
10676
|
.taw-list { flex: 1; min-height: 0; overflow: auto; padding: 0 4px 12px; }
|
|
10677
|
+
.taw-list:has(> .ta-loading) { display: flex; flex-direction: column; }
|
|
9533
10678
|
.taw-list:has(> .ta-empty) { display: flex; flex-direction: column; }
|
|
9534
10679
|
.taw-row { position: relative; display: flex; align-items: center; gap: 6px; width: 100%; height: 24px; padding: 0 6px 0 8px; border: 0; border-radius: 6px; background: none; color: var(--ta-body); font: inherit; text-align: left; cursor: pointer; user-select: none; outline: none; }
|
|
9535
10680
|
.taw-row:hover { background: var(--ta-hover); }
|
|
@@ -9654,7 +10799,7 @@ var STYLE = `
|
|
|
9654
10799
|
.taw-address-go { width: 24px; height: 24px; border-radius: 12px; }
|
|
9655
10800
|
.taw-spin { display: inline-flex; animation: taw-spin 0.9s linear infinite; }
|
|
9656
10801
|
@keyframes taw-spin { to { transform: rotate(360deg); } }
|
|
9657
|
-
.taw-browser-
|
|
10802
|
+
.taw-browser-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--ta-accent), transparent) 0 0 / 30% 100% no-repeat; animation: taw-slide 1.1s linear infinite; pointer-events: none; }
|
|
9658
10803
|
.taw-browser-home { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; align-items: center; padding: clamp(40px, 20%, 160px) 16px 14px; }
|
|
9659
10804
|
.taw-browser-sites { display: grid; grid-template-columns: repeat(auto-fit, 100px); justify-content: center; gap: 4px; width: 100%; max-width: 624px; }
|
|
9660
10805
|
.taw-browser-site { position: relative; }
|
|
@@ -10501,8 +11646,8 @@ function TerminalEditor({
|
|
|
10501
11646
|
}
|
|
10502
11647
|
event.preventDefault();
|
|
10503
11648
|
const windows = /(^|[\\/])(cmd|powershell|pwsh)(\.exe)?$/i.test(session.info.shell);
|
|
10504
|
-
const
|
|
10505
|
-
pi.terminals.writeTerminal(terminalId, `${
|
|
11649
|
+
const words2 = pi.ui.fileDrag.paths(files).map((path) => WorkspaceUtil.shellQuote(path, windows));
|
|
11650
|
+
pi.terminals.writeTerminal(terminalId, `${words2.join(" ")} `).catch(() => {
|
|
10506
11651
|
return;
|
|
10507
11652
|
});
|
|
10508
11653
|
terminal?.focus();
|