@adhdev/daemon-core 0.6.58 → 0.6.60

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.
Files changed (245) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.js +87 -89
  3. package/dist/index.js.map +1 -1
  4. package/package.json +1 -1
  5. package/src/detection/ide-detector.ts +1 -1
  6. package/src/providers/provider-loader.ts +3 -6
  7. package/providers/_builtin/.github/workflows/generate-registry.yml +0 -76
  8. package/providers/_builtin/COMPATIBILITY.md +0 -217
  9. package/providers/_builtin/CONTRIBUTING.md +0 -200
  10. package/providers/_builtin/README.md +0 -119
  11. package/providers/_builtin/_helpers/index.js +0 -188
  12. package/providers/_builtin/acp/agentpool/provider.json +0 -54
  13. package/providers/_builtin/acp/amp/provider.json +0 -52
  14. package/providers/_builtin/acp/auggie/provider.json +0 -57
  15. package/providers/_builtin/acp/autodev/provider.json +0 -54
  16. package/providers/_builtin/acp/autohand/provider.json +0 -52
  17. package/providers/_builtin/acp/blackbox-ai/provider.json +0 -54
  18. package/providers/_builtin/acp/claude-agent/provider.json +0 -57
  19. package/providers/_builtin/acp/cline-acp/provider.json +0 -54
  20. package/providers/_builtin/acp/codebuddy/provider.json +0 -54
  21. package/providers/_builtin/acp/codex-cli/provider.json +0 -57
  22. package/providers/_builtin/acp/corust-agent/provider.json +0 -52
  23. package/providers/_builtin/acp/crow-cli/provider.json +0 -54
  24. package/providers/_builtin/acp/cursor-acp/provider.json +0 -54
  25. package/providers/_builtin/acp/deepagents/provider.json +0 -52
  26. package/providers/_builtin/acp/dimcode/provider.json +0 -54
  27. package/providers/_builtin/acp/docker-cagent/provider.json +0 -57
  28. package/providers/_builtin/acp/factory-droid/provider.json +0 -60
  29. package/providers/_builtin/acp/fast-agent/provider.json +0 -52
  30. package/providers/_builtin/acp/gemini-cli/provider.json +0 -114
  31. package/providers/_builtin/acp/github-copilot/provider.json +0 -54
  32. package/providers/_builtin/acp/goose/provider.json +0 -57
  33. package/providers/_builtin/acp/junie/provider.json +0 -52
  34. package/providers/_builtin/acp/kilo/provider.json +0 -54
  35. package/providers/_builtin/acp/kimi-cli/provider.json +0 -57
  36. package/providers/_builtin/acp/minion-code/provider.json +0 -52
  37. package/providers/_builtin/acp/mistral-vibe/provider.json +0 -57
  38. package/providers/_builtin/acp/nova/provider.json +0 -54
  39. package/providers/_builtin/acp/openclaw/provider.json +0 -54
  40. package/providers/_builtin/acp/opencode/provider.json +0 -52
  41. package/providers/_builtin/acp/openhands/provider.json +0 -54
  42. package/providers/_builtin/acp/pi-acp/provider.json +0 -52
  43. package/providers/_builtin/acp/qoder/provider.json +0 -54
  44. package/providers/_builtin/acp/qwen-code/provider.json +0 -60
  45. package/providers/_builtin/acp/stakpak/provider.json +0 -54
  46. package/providers/_builtin/acp/vtcode/provider.json +0 -54
  47. package/providers/_builtin/cli/aider-cli/provider.json +0 -37
  48. package/providers/_builtin/cli/aider-cli/scripts/1.0/detect_status.js +0 -20
  49. package/providers/_builtin/cli/aider-cli/scripts/1.0/parse_approval.js +0 -10
  50. package/providers/_builtin/cli/aider-cli/scripts/1.0/parse_output.js +0 -97
  51. package/providers/_builtin/cli/aider-cli/scripts/1.0/scripts.js +0 -7
  52. package/providers/_builtin/cli/claude-cli/provider.json +0 -121
  53. package/providers/_builtin/cli/claude-cli/scripts/1.0/detect_status.js +0 -83
  54. package/providers/_builtin/cli/claude-cli/scripts/1.0/parse_approval.js +0 -97
  55. package/providers/_builtin/cli/claude-cli/scripts/1.0/parse_output.js +0 -417
  56. package/providers/_builtin/cli/claude-cli/scripts/1.0/scripts.js +0 -42
  57. package/providers/_builtin/cli/codex-cli/provider.json +0 -90
  58. package/providers/_builtin/cli/codex-cli/scripts/1.0/detect_status.js +0 -54
  59. package/providers/_builtin/cli/codex-cli/scripts/1.0/parse_approval.js +0 -91
  60. package/providers/_builtin/cli/codex-cli/scripts/1.0/parse_output.js +0 -522
  61. package/providers/_builtin/cli/codex-cli/scripts/1.0/scripts.js +0 -11
  62. package/providers/_builtin/cli/cursor-cli/provider.json +0 -37
  63. package/providers/_builtin/cli/cursor-cli/scripts/1.0/detect_status.js +0 -19
  64. package/providers/_builtin/cli/cursor-cli/scripts/1.0/parse_approval.js +0 -10
  65. package/providers/_builtin/cli/cursor-cli/scripts/1.0/parse_output.js +0 -48
  66. package/providers/_builtin/cli/cursor-cli/scripts/1.0/scripts.js +0 -7
  67. package/providers/_builtin/cli/gemini-cli/provider.json +0 -109
  68. package/providers/_builtin/cli/gemini-cli/scripts/1.0/detect_status.js +0 -26
  69. package/providers/_builtin/cli/gemini-cli/scripts/1.0/parse_approval.js +0 -22
  70. package/providers/_builtin/cli/gemini-cli/scripts/1.0/parse_output.js +0 -71
  71. package/providers/_builtin/cli/gemini-cli/scripts/1.0/scripts.js +0 -12
  72. package/providers/_builtin/cli/github-copilot-cli/provider.json +0 -37
  73. package/providers/_builtin/cli/github-copilot-cli/scripts/1.0/detect_status.js +0 -19
  74. package/providers/_builtin/cli/github-copilot-cli/scripts/1.0/parse_approval.js +0 -9
  75. package/providers/_builtin/cli/github-copilot-cli/scripts/1.0/parse_output.js +0 -48
  76. package/providers/_builtin/cli/github-copilot-cli/scripts/1.0/scripts.js +0 -7
  77. package/providers/_builtin/cli/goose-cli/provider.json +0 -37
  78. package/providers/_builtin/cli/goose-cli/scripts/1.0/detect_status.js +0 -20
  79. package/providers/_builtin/cli/goose-cli/scripts/1.0/parse_approval.js +0 -10
  80. package/providers/_builtin/cli/goose-cli/scripts/1.0/parse_output.js +0 -48
  81. package/providers/_builtin/cli/goose-cli/scripts/1.0/scripts.js +0 -7
  82. package/providers/_builtin/cli/opencode-cli/provider.json +0 -37
  83. package/providers/_builtin/cli/opencode-cli/scripts/1.0/detect_status.js +0 -15
  84. package/providers/_builtin/cli/opencode-cli/scripts/1.0/parse_approval.js +0 -9
  85. package/providers/_builtin/cli/opencode-cli/scripts/1.0/parse_output.js +0 -48
  86. package/providers/_builtin/cli/opencode-cli/scripts/1.0/scripts.js +0 -7
  87. package/providers/_builtin/docs/CDP_SELECTOR_GUIDE.md +0 -370
  88. package/providers/_builtin/docs/PROVIDER_GUIDE.md +0 -916
  89. package/providers/_builtin/extension/cline/provider.json +0 -37
  90. package/providers/_builtin/extension/cline/scripts/1.0/focus_editor.js +0 -48
  91. package/providers/_builtin/extension/cline/scripts/1.0/list_chats.js +0 -100
  92. package/providers/_builtin/extension/cline/scripts/1.0/list_models.js +0 -43
  93. package/providers/_builtin/extension/cline/scripts/1.0/list_modes.js +0 -35
  94. package/providers/_builtin/extension/cline/scripts/1.0/new_session.js +0 -85
  95. package/providers/_builtin/extension/cline/scripts/1.0/open_panel.js +0 -25
  96. package/providers/_builtin/extension/cline/scripts/1.0/read_chat.js +0 -270
  97. package/providers/_builtin/extension/cline/scripts/1.0/resolve_action.js +0 -83
  98. package/providers/_builtin/extension/cline/scripts/1.0/scripts.js +0 -82
  99. package/providers/_builtin/extension/cline/scripts/1.0/send_message.js +0 -95
  100. package/providers/_builtin/extension/cline/scripts/1.0/set_mode.js +0 -36
  101. package/providers/_builtin/extension/cline/scripts/1.0/set_model.js +0 -36
  102. package/providers/_builtin/extension/cline/scripts/1.0/switch_session.js +0 -206
  103. package/providers/_builtin/extension/codex/provider.json +0 -38
  104. package/providers/_builtin/extension/codex/scripts/1.0/click_conversation_webview.js +0 -24
  105. package/providers/_builtin/extension/codex/scripts/1.0/explore_chat_webview.js +0 -110
  106. package/providers/_builtin/extension/codex/scripts/1.0/explore_controls_webview.js +0 -75
  107. package/providers/_builtin/extension/codex/scripts/1.0/explore_dom.js +0 -58
  108. package/providers/_builtin/extension/codex/scripts/1.0/explore_dropdown_webview.js +0 -64
  109. package/providers/_builtin/extension/codex/scripts/1.0/inspect_code_webview.js +0 -55
  110. package/providers/_builtin/extension/codex/scripts/1.0/list_models.js +0 -63
  111. package/providers/_builtin/extension/codex/scripts/1.0/list_modes.js +0 -140
  112. package/providers/_builtin/extension/codex/scripts/1.0/message_structure_webview.js +0 -79
  113. package/providers/_builtin/extension/codex/scripts/1.0/new_session.js +0 -26
  114. package/providers/_builtin/extension/codex/scripts/1.0/read_chat.js +0 -516
  115. package/providers/_builtin/extension/codex/scripts/1.0/resolve_action.js +0 -82
  116. package/providers/_builtin/extension/codex/scripts/1.0/send_message.js +0 -42
  117. package/providers/_builtin/extension/codex/scripts/1.0/set_mode.js +0 -165
  118. package/providers/_builtin/extension/codex/scripts/1.0/set_model.js +0 -86
  119. package/providers/_builtin/extension/roo-code/provider.json +0 -37
  120. package/providers/_builtin/extension/roo-code/scripts/1.0/scripts.js +0 -82
  121. package/providers/_builtin/ide/antigravity/provider.json +0 -88
  122. package/providers/_builtin/ide/antigravity/scripts/1.0/focus_editor.js +0 -20
  123. package/providers/_builtin/ide/antigravity/scripts/1.0/list_chats.js +0 -137
  124. package/providers/_builtin/ide/antigravity/scripts/1.0/list_models.js +0 -61
  125. package/providers/_builtin/ide/antigravity/scripts/1.0/list_modes.js +0 -72
  126. package/providers/_builtin/ide/antigravity/scripts/1.0/new_session.js +0 -75
  127. package/providers/_builtin/ide/antigravity/scripts/1.0/read_chat.js +0 -352
  128. package/providers/_builtin/ide/antigravity/scripts/1.0/resolve_action.js +0 -63
  129. package/providers/_builtin/ide/antigravity/scripts/1.0/scripts.js +0 -67
  130. package/providers/_builtin/ide/antigravity/scripts/1.0/send_message.js +0 -56
  131. package/providers/_builtin/ide/antigravity/scripts/1.0/set_mode.js +0 -67
  132. package/providers/_builtin/ide/antigravity/scripts/1.0/set_model.js +0 -72
  133. package/providers/_builtin/ide/antigravity/scripts/1.0/switch_session.js +0 -114
  134. package/providers/_builtin/ide/cursor/provider.json +0 -70
  135. package/providers/_builtin/ide/cursor/scripts/1.0/dismiss_notification.js +0 -30
  136. package/providers/_builtin/ide/cursor/scripts/1.0/focus_editor.js +0 -13
  137. package/providers/_builtin/ide/cursor/scripts/1.0/list_models.js +0 -78
  138. package/providers/_builtin/ide/cursor/scripts/1.0/list_modes.js +0 -40
  139. package/providers/_builtin/ide/cursor/scripts/1.0/list_notifications.js +0 -23
  140. package/providers/_builtin/ide/cursor/scripts/1.0/list_sessions.js +0 -42
  141. package/providers/_builtin/ide/cursor/scripts/1.0/new_session.js +0 -20
  142. package/providers/_builtin/ide/cursor/scripts/1.0/open_panel.js +0 -23
  143. package/providers/_builtin/ide/cursor/scripts/1.0/read_chat.js +0 -318
  144. package/providers/_builtin/ide/cursor/scripts/1.0/resolve_action.js +0 -19
  145. package/providers/_builtin/ide/cursor/scripts/1.0/scripts.js +0 -78
  146. package/providers/_builtin/ide/cursor/scripts/1.0/send_message.js +0 -23
  147. package/providers/_builtin/ide/cursor/scripts/1.0/set_mode.js +0 -38
  148. package/providers/_builtin/ide/cursor/scripts/1.0/set_model.js +0 -81
  149. package/providers/_builtin/ide/cursor/scripts/1.0/switch_session.js +0 -28
  150. package/providers/_builtin/ide/kiro/provider.json +0 -68
  151. package/providers/_builtin/ide/kiro/scripts/1.0/focus_editor.js +0 -20
  152. package/providers/_builtin/ide/kiro/scripts/1.0/open_panel.js +0 -47
  153. package/providers/_builtin/ide/kiro/scripts/1.0/resolve_action.js +0 -54
  154. package/providers/_builtin/ide/kiro/scripts/1.0/send_message.js +0 -29
  155. package/providers/_builtin/ide/kiro/scripts/1.0/webview_dump_html.js +0 -1
  156. package/providers/_builtin/ide/kiro/scripts/1.0/webview_list_models.js +0 -42
  157. package/providers/_builtin/ide/kiro/scripts/1.0/webview_list_modes.js +0 -22
  158. package/providers/_builtin/ide/kiro/scripts/1.0/webview_list_sessions.js +0 -21
  159. package/providers/_builtin/ide/kiro/scripts/1.0/webview_new_session.js +0 -34
  160. package/providers/_builtin/ide/kiro/scripts/1.0/webview_read_chat.js +0 -161
  161. package/providers/_builtin/ide/kiro/scripts/1.0/webview_resolve_action.js +0 -62
  162. package/providers/_builtin/ide/kiro/scripts/1.0/webview_send_message.js +0 -94
  163. package/providers/_builtin/ide/kiro/scripts/1.0/webview_set_mode.js +0 -34
  164. package/providers/_builtin/ide/kiro/scripts/1.0/webview_set_model.js +0 -47
  165. package/providers/_builtin/ide/kiro/scripts/1.0/webview_switch_session.js +0 -26
  166. package/providers/_builtin/ide/pearai/.tmp/after_rich.json +0 -157
  167. package/providers/_builtin/ide/pearai/.tmp/after_rich_raw.json +0 -161
  168. package/providers/_builtin/ide/pearai/.tmp/after_switch.json +0 -592
  169. package/providers/_builtin/ide/pearai/.tmp/after_switch_raw.json +0 -596
  170. package/providers/_builtin/ide/pearai/.tmp/home_dump_raw.json +0 -176
  171. package/providers/_builtin/ide/pearai/.tmp/items_raw.json +0 -778
  172. package/providers/_builtin/ide/pearai/.tmp/webview_dump.json +0 -157
  173. package/providers/_builtin/ide/pearai/.tmp/webview_dump_raw.json +0 -161
  174. package/providers/_builtin/ide/pearai/provider.json +0 -71
  175. package/providers/_builtin/ide/pearai/scripts/1.0/focus_editor.js +0 -16
  176. package/providers/_builtin/ide/pearai/scripts/1.0/list_models.js +0 -45
  177. package/providers/_builtin/ide/pearai/scripts/1.0/list_modes.js +0 -44
  178. package/providers/_builtin/ide/pearai/scripts/1.0/list_sessions.js +0 -93
  179. package/providers/_builtin/ide/pearai/scripts/1.0/new_session.js +0 -38
  180. package/providers/_builtin/ide/pearai/scripts/1.0/open_panel.js +0 -23
  181. package/providers/_builtin/ide/pearai/scripts/1.0/read_chat.js +0 -169
  182. package/providers/_builtin/ide/pearai/scripts/1.0/resolve_action.js +0 -60
  183. package/providers/_builtin/ide/pearai/scripts/1.0/scripts.js +0 -111
  184. package/providers/_builtin/ide/pearai/scripts/1.0/send_message.js +0 -104
  185. package/providers/_builtin/ide/pearai/scripts/1.0/set_mode.js +0 -51
  186. package/providers/_builtin/ide/pearai/scripts/1.0/set_model.js +0 -54
  187. package/providers/_builtin/ide/pearai/scripts/1.0/switch_session.js +0 -81
  188. package/providers/_builtin/ide/trae/provider.json +0 -72
  189. package/providers/_builtin/ide/trae/scripts/1.0/focus_editor.js +0 -20
  190. package/providers/_builtin/ide/trae/scripts/1.0/list_chats.js +0 -24
  191. package/providers/_builtin/ide/trae/scripts/1.0/list_models.js +0 -39
  192. package/providers/_builtin/ide/trae/scripts/1.0/list_modes.js +0 -39
  193. package/providers/_builtin/ide/trae/scripts/1.0/new_session.js +0 -30
  194. package/providers/_builtin/ide/trae/scripts/1.0/open_panel.js +0 -44
  195. package/providers/_builtin/ide/trae/scripts/1.0/read_chat.js +0 -113
  196. package/providers/_builtin/ide/trae/scripts/1.0/resolve_action.js +0 -54
  197. package/providers/_builtin/ide/trae/scripts/1.0/scripts.js +0 -82
  198. package/providers/_builtin/ide/trae/scripts/1.0/send_message.js +0 -69
  199. package/providers/_builtin/ide/trae/scripts/1.0/set_mode.js +0 -15
  200. package/providers/_builtin/ide/trae/scripts/1.0/set_model.js +0 -15
  201. package/providers/_builtin/ide/trae/scripts/1.0/switch_session.js +0 -23
  202. package/providers/_builtin/ide/vscode/provider.json +0 -74
  203. package/providers/_builtin/ide/vscode/scripts/1.0/focus_editor.js +0 -1
  204. package/providers/_builtin/ide/vscode/scripts/1.0/list_models.js +0 -1
  205. package/providers/_builtin/ide/vscode/scripts/1.0/list_sessions.js +0 -1
  206. package/providers/_builtin/ide/vscode/scripts/1.0/new_session.js +0 -1
  207. package/providers/_builtin/ide/vscode/scripts/1.0/open_panel.js +0 -1
  208. package/providers/_builtin/ide/vscode/scripts/1.0/read_chat.js +0 -1
  209. package/providers/_builtin/ide/vscode/scripts/1.0/resolve_action.js +0 -1
  210. package/providers/_builtin/ide/vscode/scripts/1.0/scripts.js +0 -25
  211. package/providers/_builtin/ide/vscode/scripts/1.0/send_message.js +0 -1
  212. package/providers/_builtin/ide/vscode/scripts/1.0/set_model.js +0 -1
  213. package/providers/_builtin/ide/vscode/scripts/1.0/switch_session.js +0 -1
  214. package/providers/_builtin/ide/vscode-insiders/provider.json +0 -68
  215. package/providers/_builtin/ide/vscodium/provider.json +0 -69
  216. package/providers/_builtin/ide/windsurf/provider.json +0 -57
  217. package/providers/_builtin/ide/windsurf/scripts/1.0/focus_editor.js +0 -36
  218. package/providers/_builtin/ide/windsurf/scripts/1.0/list_chats.js +0 -23
  219. package/providers/_builtin/ide/windsurf/scripts/1.0/list_models.js +0 -56
  220. package/providers/_builtin/ide/windsurf/scripts/1.0/list_modes.js +0 -63
  221. package/providers/_builtin/ide/windsurf/scripts/1.0/list_sessions.js +0 -79
  222. package/providers/_builtin/ide/windsurf/scripts/1.0/new_session.js +0 -58
  223. package/providers/_builtin/ide/windsurf/scripts/1.0/open_panel.js +0 -67
  224. package/providers/_builtin/ide/windsurf/scripts/1.0/read_chat.js +0 -253
  225. package/providers/_builtin/ide/windsurf/scripts/1.0/resolve_action.js +0 -82
  226. package/providers/_builtin/ide/windsurf/scripts/1.0/scripts.js +0 -82
  227. package/providers/_builtin/ide/windsurf/scripts/1.0/send_message.js +0 -20
  228. package/providers/_builtin/ide/windsurf/scripts/1.0/set_mode.js +0 -43
  229. package/providers/_builtin/ide/windsurf/scripts/1.0/set_model.js +0 -49
  230. package/providers/_builtin/ide/windsurf/scripts/1.0/switch_session.js +0 -82
  231. package/providers/_builtin/ide/windsurf/scripts/1.0.bak/focus_editor.js +0 -30
  232. package/providers/_builtin/ide/windsurf/scripts/1.0.bak/list_chats.js +0 -117
  233. package/providers/_builtin/ide/windsurf/scripts/1.0.bak/list_models.js +0 -39
  234. package/providers/_builtin/ide/windsurf/scripts/1.0.bak/list_modes.js +0 -39
  235. package/providers/_builtin/ide/windsurf/scripts/1.0.bak/new_session.js +0 -69
  236. package/providers/_builtin/ide/windsurf/scripts/1.0.bak/open_panel.js +0 -58
  237. package/providers/_builtin/ide/windsurf/scripts/1.0.bak/read_chat.js +0 -315
  238. package/providers/_builtin/ide/windsurf/scripts/1.0.bak/resolve_action.js +0 -68
  239. package/providers/_builtin/ide/windsurf/scripts/1.0.bak/scripts.js +0 -82
  240. package/providers/_builtin/ide/windsurf/scripts/1.0.bak/send_message.js +0 -87
  241. package/providers/_builtin/ide/windsurf/scripts/1.0.bak/set_mode.js +0 -15
  242. package/providers/_builtin/ide/windsurf/scripts/1.0.bak/set_model.js +0 -15
  243. package/providers/_builtin/ide/windsurf/scripts/1.0.bak/switch_session.js +0 -58
  244. package/providers/_builtin/registry.json +0 -376
  245. package/providers/_builtin/validate.js +0 -156
@@ -1,165 +0,0 @@
1
- /**
2
- * Codex Extension — set_mode
3
- *
4
- * Opens the mode dropdown (same discovery as list_modes), selects an item matching ${MODE}.
5
- *
6
- * Placeholder: ${MODE}
7
- */
8
- (() => {
9
- try {
10
- const targetMode = ${MODE};
11
-
12
- function resolveDoc() {
13
- let doc = document;
14
- let root = doc.getElementById('root');
15
- if (!root) {
16
- const iframes = doc.querySelectorAll('iframe');
17
- for (const iframe of iframes) {
18
- try {
19
- const innerDoc = iframe.contentDocument || iframe.contentWindow?.document;
20
- if (innerDoc?.getElementById('root')) {
21
- doc = innerDoc;
22
- root = innerDoc.getElementById('root');
23
- break;
24
- }
25
- } catch (e) { /* cross-origin */ }
26
- }
27
- }
28
- return { doc, root };
29
- }
30
-
31
- function isModelText(text) {
32
- return /^(GPT-|gpt-|o\d|claude-|sonnet|opus)/i.test(text);
33
- }
34
-
35
- /**
36
- * Find the mode menu button using multi-root strategy (matching readChat).
37
- */
38
- function findModeButton(doc) {
39
- for (const d of [doc, document]) {
40
- const searchRoots = [
41
- d.querySelector('[class*="thread-composer-max-width"]'),
42
- d.querySelector('[class*="thread-composer"]'),
43
- d.querySelector('[class*="pb-2"]'),
44
- d.body,
45
- ].filter(Boolean);
46
-
47
- for (const searchRoot of searchRoots) {
48
- const menuBtns = Array.from(searchRoot.querySelectorAll('button[aria-haspopup="menu"]'))
49
- .filter(b => b.offsetWidth > 0);
50
- for (const btn of menuBtns) {
51
- const text = (btn.textContent || '').trim();
52
- if (!isModelText(text) && text.length > 0 && text.length < 30) {
53
- return btn;
54
- }
55
- }
56
- }
57
- }
58
- return null;
59
- }
60
-
61
- function openMenu(btn) {
62
- const rect = btn.getBoundingClientRect();
63
- const cx = rect.left + rect.width / 2;
64
- const cy = rect.top + rect.height / 2;
65
- btn.dispatchEvent(
66
- new PointerEvent('pointerdown', { bubbles: true, clientX: cx, clientY: cy, pointerId: 1 }),
67
- );
68
- btn.dispatchEvent(new MouseEvent('mousedown', { bubbles: true, clientX: cx, clientY: cy }));
69
- btn.dispatchEvent(
70
- new PointerEvent('pointerup', { bubbles: true, clientX: cx, clientY: cy, pointerId: 1 }),
71
- );
72
- btn.dispatchEvent(new MouseEvent('mouseup', { bubbles: true, clientX: cx, clientY: cy }));
73
- btn.dispatchEvent(new MouseEvent('click', { bubbles: true, clientX: cx, clientY: cy }));
74
- }
75
-
76
- function clickItem(el) {
77
- const ir = el.getBoundingClientRect();
78
- const ix = ir.left + ir.width / 2;
79
- const iy = ir.top + ir.height / 2;
80
- el.dispatchEvent(
81
- new PointerEvent('pointerdown', { bubbles: true, clientX: ix, clientY: iy }),
82
- );
83
- el.dispatchEvent(new MouseEvent('mousedown', { bubbles: true, clientX: ix, clientY: iy }));
84
- el.dispatchEvent(new PointerEvent('pointerup', { bubbles: true, clientX: ix, clientY: iy }));
85
- el.dispatchEvent(new MouseEvent('mouseup', { bubbles: true, clientX: ix, clientY: iy }));
86
- el.dispatchEvent(new MouseEvent('click', { bubbles: true, clientX: ix, clientY: iy }));
87
- }
88
-
89
- const { doc, root } = resolveDoc();
90
- if (!root) return JSON.stringify({ success: false, error: 'no root' });
91
-
92
- const want =
93
- typeof targetMode === 'string'
94
- ? targetMode.trim()
95
- : targetMode != null
96
- ? String(targetMode).trim()
97
- : '';
98
- if (!want) return JSON.stringify({ success: false, error: 'empty mode' });
99
-
100
- const modeBtn = findModeButton(doc);
101
- if (!modeBtn) return JSON.stringify({ success: false, error: 'mode menu button not found' });
102
-
103
- const menuDoc = modeBtn.ownerDocument || doc;
104
-
105
- const currentLabel = (modeBtn.textContent || '').trim();
106
- if (currentLabel.toLowerCase() === want.toLowerCase()) {
107
- return JSON.stringify({ success: true, mode: currentLabel, changed: false });
108
- }
109
-
110
- openMenu(modeBtn);
111
-
112
- return new Promise((resolve) => {
113
- setTimeout(() => {
114
- let menu = menuDoc.querySelector('[role="menu"][data-state="open"]');
115
- if (!menu) menu = menuDoc.querySelector('[role="menu"]');
116
-
117
- if (!menu) {
118
- menuDoc.dispatchEvent(
119
- new KeyboardEvent('keydown', { key: 'Escape', code: 'Escape', keyCode: 27, bubbles: true }),
120
- );
121
- return resolve(JSON.stringify({ success: false, error: 'mode menu did not open' }));
122
- }
123
-
124
- const items = Array.from(
125
- menu.querySelectorAll(
126
- '[role="menuitem"], [role="menuitemradio"], [role="option"], div[class*="cursor-interaction"]',
127
- ),
128
- );
129
-
130
- const norm = (s) => (s || '').trim().toLowerCase();
131
- const wantN = norm(want);
132
-
133
- let match = items.find((el) => norm(el.textContent) === wantN);
134
- if (!match) {
135
- match = items.find((el) => norm(el.textContent).includes(wantN) || wantN.includes(norm(el.textContent)));
136
- }
137
-
138
- if (!match) {
139
- menuDoc.dispatchEvent(
140
- new KeyboardEvent('keydown', { key: 'Escape', code: 'Escape', keyCode: 27, bubbles: true }),
141
- );
142
- const available = items
143
- .map((el) => (el.textContent || '').trim())
144
- .filter((t) => t.length > 0 && t.length < 80);
145
- return resolve(
146
- JSON.stringify({
147
- success: false,
148
- error: `mode "${want}" not found`,
149
- available,
150
- }),
151
- );
152
- }
153
-
154
- const picked = (match.textContent || '').trim();
155
- clickItem(match);
156
-
157
- setTimeout(() => {
158
- resolve(JSON.stringify({ success: true, mode: picked, changed: true }));
159
- }, 350);
160
- }, 550);
161
- });
162
- } catch (e) {
163
- return JSON.stringify({ success: false, error: e.message || String(e) });
164
- }
165
- })();
@@ -1,86 +0,0 @@
1
- /**
2
- * Codex Extension — set_model
3
- *
4
- * Opens the model dropdown via pointer events, clicks the target model.
5
- *
6
- * Placeholder: ${MODEL}
7
- */
8
- (() => {
9
- try {
10
- const targetModel = ${MODEL};
11
-
12
- const buttons = Array.from(document.querySelectorAll('button')).filter(b => b.offsetWidth > 0);
13
- const modelBtn = buttons.find(b => {
14
- const text = (b.textContent || '').trim();
15
- return /^(GPT-|gpt-|o\d|claude-)/i.test(text) && b.getAttribute('aria-haspopup') === 'menu';
16
- });
17
-
18
- if (!modelBtn) return JSON.stringify({ error: 'Model selector button not found' });
19
-
20
- const currentModel = (modelBtn.textContent || '').trim();
21
-
22
- // Open dropdown with PointerEvent sequence
23
- const rect = modelBtn.getBoundingClientRect();
24
- const x = rect.left + rect.width / 2;
25
- const y = rect.top + rect.height / 2;
26
- modelBtn.dispatchEvent(new PointerEvent('pointerdown', { bubbles: true, clientX: x, clientY: y }));
27
- modelBtn.dispatchEvent(new MouseEvent('mousedown', { bubbles: true, clientX: x, clientY: y }));
28
- modelBtn.dispatchEvent(new PointerEvent('pointerup', { bubbles: true, clientX: x, clientY: y }));
29
- modelBtn.dispatchEvent(new MouseEvent('mouseup', { bubbles: true, clientX: x, clientY: y }));
30
- modelBtn.dispatchEvent(new MouseEvent('click', { bubbles: true, clientX: x, clientY: y }));
31
-
32
- return new Promise((resolve) => {
33
- setTimeout(() => {
34
- const menu = document.querySelector('[role="menu"][data-state="open"]');
35
- if (!menu) {
36
- resolve(JSON.stringify({ success: false, error: 'Menu did not open' }));
37
- return;
38
- }
39
-
40
- // Find all clickable items in the menu
41
- const items = menu.querySelectorAll('[role="menuitem"], [role="menuitemradio"], div[class*="cursor-interaction"]');
42
-
43
- for (const item of items) {
44
- const text = (item.textContent || '').trim();
45
- if (text.toLowerCase() === targetModel.toLowerCase() ||
46
- text.toLowerCase().includes(targetModel.toLowerCase())) {
47
- // Click with pointer events
48
- const ir = item.getBoundingClientRect();
49
- const ix = ir.left + ir.width / 2;
50
- const iy = ir.top + ir.height / 2;
51
- item.dispatchEvent(new PointerEvent('pointerdown', { bubbles: true, clientX: ix, clientY: iy }));
52
- item.dispatchEvent(new MouseEvent('mousedown', { bubbles: true, clientX: ix, clientY: iy }));
53
- item.dispatchEvent(new PointerEvent('pointerup', { bubbles: true, clientX: ix, clientY: iy }));
54
- item.dispatchEvent(new MouseEvent('mouseup', { bubbles: true, clientX: ix, clientY: iy }));
55
- item.dispatchEvent(new MouseEvent('click', { bubbles: true, clientX: ix, clientY: iy }));
56
-
57
- resolve(JSON.stringify({
58
- success: true,
59
- previousModel: currentModel,
60
- selectedModel: text,
61
- }));
62
- return;
63
- }
64
- }
65
-
66
- // Not found — close and report
67
- document.dispatchEvent(new KeyboardEvent('keydown', {
68
- key: 'Escape', code: 'Escape', keyCode: 27, bubbles: true
69
- }));
70
-
71
- const available = Array.from(items)
72
- .map(el => (el.textContent || '').trim())
73
- .filter(t => t.length > 0 && t.length < 60 && !t.includes('Select model'));
74
-
75
- resolve(JSON.stringify({
76
- success: false,
77
- error: `Model '${targetModel}' not found`,
78
- currentModel,
79
- available,
80
- }));
81
- }, 500);
82
- });
83
- } catch (e) {
84
- return JSON.stringify({ error: e.message || String(e) });
85
- }
86
- })()
@@ -1,37 +0,0 @@
1
- {
2
- "type": "roo-code",
3
- "name": "Roo Code",
4
- "category": "extension",
5
- "extensionId": "RooVeterinaryInc.roo-cline",
6
- "extensionIdPattern": "extensionId=RooVeterinaryInc\\.roo-cline",
7
- "extensionIdPattern_flags": "i",
8
- "vscodeCommands": {
9
- "focusPanel": "roo-cline.SidebarProvider.focus"
10
- },
11
- "settings": {
12
- "approvalAlert": {
13
- "type": "boolean",
14
- "default": true,
15
- "public": true,
16
- "label": "Approval Notifications",
17
- "description": "Show notification when approval is needed"
18
- },
19
- "longGeneratingAlert": {
20
- "type": "boolean",
21
- "default": true,
22
- "public": true,
23
- "label": "Long Generation Alert",
24
- "description": "Alert when generation takes too long"
25
- },
26
- "longGeneratingThresholdSec": {
27
- "type": "number",
28
- "default": 180,
29
- "public": true,
30
- "label": "Long Generation Threshold (sec)",
31
- "min": 30,
32
- "max": 600
33
- }
34
- },
35
- "defaultScriptDir": "scripts/1.0",
36
- "compatibility": []
37
- }
@@ -1,82 +0,0 @@
1
- /**
2
- * CDP Scripts — Router
3
- *
4
- * Version routing is handled by ProviderLoader:
5
- * Pattern:
6
- * - Scripts WITHOUT params: loaded as-is (self-invoking IIFE)
7
- * - Scripts WITH params: loaded as function expression, invoked with params JSON
8
- * e.g. `(${script})(${JSON.stringify(params)})`
9
- */
10
-
11
- 'use strict';
12
-
13
- const fs = require('fs');
14
- const path = require('path');
15
-
16
- function load(name) {
17
- try { return fs.readFileSync(path.join(__dirname, name), 'utf-8'); }
18
- catch { return null; }
19
- }
20
-
21
- function withParams(name, params) {
22
- let script = load(name);
23
- if (!script) return null;
24
-
25
- // For legacy scripts checking MESSAGE, interpolate them manually
26
- if (script.includes('${ MESSAGE }')) {
27
- const msg = params?.MESSAGE || params?.text || '';
28
- return script.replace(/\$\{ MESSAGE \}/g, JSON.stringify(msg));
29
- }
30
- if (script.includes('${ BUTTON_TEXT }')) {
31
- const btn = params?.BUTTON_TEXT || params?.buttonText || '';
32
- return script.replace(/\$\{ BUTTON_TEXT \}/g, JSON.stringify(btn));
33
- }
34
-
35
- return `(${script})(${JSON.stringify(params)})`;
36
- }
37
-
38
- // ─── Core (no params — IIFE) ───
39
-
40
- module.exports.readChat = () => load('read_chat.js') || load('webview_read_chat.js');
41
- module.exports.sendMessage = (params) => {
42
- let s = load('send_message.js');
43
- if (!s) s = load('webview_send_message.js');
44
- if (!s) return null;
45
- // Legacy template substitution fallback
46
- if (s.includes('${ MESSAGE }')) {
47
- const msg = params?.MESSAGE || params?.text || params || '';
48
- return s.replace(/\$\{ MESSAGE \}/g, JSON.stringify(msg));
49
- }
50
- return withParams('send_message.js', params) || withParams('webview_send_message.js', params);
51
- };
52
- module.exports.listSessions = () => load('list_sessions.js');
53
- module.exports.newSession = () => load('new_session.js');
54
- module.exports.focusEditor = () => load('focus_editor.js');
55
- module.exports.openPanel = () => load('open_panel.js');
56
- module.exports.listModels = () => load('list_models.js');
57
- module.exports.listModes = () => load('list_modes.js');
58
-
59
- // ─── With params (function expression) ───
60
-
61
- module.exports.switchSession = (params) => {
62
- const index = typeof params === 'number' ? params : params?.index ?? 0;
63
- const title = typeof params === 'string' ? params : params?.title || null;
64
- return withParams('switch_session.js', { index, title });
65
- };
66
-
67
- module.exports.resolveAction = (params) => {
68
- const action = typeof params === 'string' ? params : params?.action || 'approve';
69
- const buttonText = params?.button || params?.buttonText
70
- || (action === 'approve' ? 'Accept' : action === 'reject' ? 'Reject' : action);
71
- return withParams('resolve_action.js', { buttonText, BUTTON_TEXT: buttonText });
72
- };
73
-
74
- module.exports.setModel = (params) => {
75
- const model = typeof params === 'string' ? params : params?.model;
76
- return withParams('set_model.js', { model });
77
- };
78
-
79
- module.exports.setMode = (params) => {
80
- const mode = typeof params === 'string' ? params : params?.mode;
81
- return withParams('set_mode.js', { mode });
82
- };
@@ -1,88 +0,0 @@
1
- {
2
- "type": "antigravity",
3
- "name": "Antigravity",
4
- "category": "ide",
5
- "displayName": "Antigravity",
6
- "icon": "🚀",
7
- "cli": "antigravity",
8
- "cdpPorts": [
9
- 9335,
10
- 9336
11
- ],
12
- "targetFilter": {
13
- "urlIncludes": "workbench.html",
14
- "urlExcludes": ["agent"],
15
- "titleExcludes": "extension-output|ADHDev CDP|Debug Console|Output\\s*$|Launchpad"
16
- },
17
- "processNames": {
18
- "darwin": "Antigravity",
19
- "win32": [
20
- "Antigravity.exe"
21
- ]
22
- },
23
- "paths": {
24
- "darwin": [
25
- "/Applications/Antigravity.app"
26
- ],
27
- "win32": [
28
- "C:\\Users\\*\\AppData\\Local\\Programs\\antigravity\\Antigravity.exe"
29
- ],
30
- "linux": [
31
- "/opt/Antigravity",
32
- "/usr/share/antigravity"
33
- ]
34
- },
35
- "inputMethod": "cdp-type-and-send",
36
- "inputSelector": "[contenteditable=\"true\"][role=\"textbox\"]",
37
- "versionCommand": "antigravity --version",
38
- "providerVersion": "1.0.0",
39
- "compatibility": [
40
- { "ideVersion": ">=1.0.0", "scriptDir": "scripts/1.0" }
41
- ],
42
- "defaultScriptDir": "scripts/1.0",
43
- "settings": {
44
- "approvalAlert": {
45
- "type": "boolean",
46
- "default": true,
47
- "public": true,
48
- "label": "Approval Notifications",
49
- "description": "Show notification when approval is needed"
50
- },
51
- "longGeneratingAlert": {
52
- "type": "boolean",
53
- "default": true,
54
- "public": true,
55
- "label": "Long Generation Alert",
56
- "description": "Alert when generation takes too long"
57
- },
58
- "longGeneratingThresholdSec": {
59
- "type": "number",
60
- "default": 180,
61
- "public": true,
62
- "label": "Long Generation Threshold (sec)",
63
- "min": 30,
64
- "max": 600
65
- },
66
- "showThinking": {
67
- "type": "boolean",
68
- "default": true,
69
- "public": true,
70
- "label": "Show Thinking",
71
- "description": "Display AI thinking/reasoning process in chat"
72
- },
73
- "showToolCalls": {
74
- "type": "boolean",
75
- "default": true,
76
- "public": true,
77
- "label": "Show Tool Calls",
78
- "description": "Display tool call summaries (Searched, Analyzed, Edited, etc.)"
79
- },
80
- "showTerminal": {
81
- "type": "boolean",
82
- "default": true,
83
- "public": true,
84
- "label": "Show Terminal",
85
- "description": "Display terminal command execution and output"
86
- }
87
- }
88
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * Cursor v1 — focus_editor
3
- *
4
- * CURSOR.md 4-5: Selector priority
5
- * [contenteditable="true"][role="textbox"]
6
- * → .chat-input textarea
7
- * → .composer-input
8
- * → textarea
9
- *
10
- * final Check: 2026-03-06
11
- */
12
- (() => {
13
- const editor = document.querySelector('[contenteditable="true"][role="textbox"]')
14
- || document.querySelector('.chat-input textarea')
15
- || document.querySelector('.composer-input')
16
- || document.querySelector('textarea.native-input')
17
- || document.querySelector('textarea');
18
- if (editor) { editor.focus(); return 'focused'; }
19
- return 'no editor found';
20
- })()
@@ -1,137 +0,0 @@
1
- /**
2
- * Antigravity v1 — list_chats (v3 — enhanced selector)
3
- *
4
- * history toggle click open conversation list panel,
5
- * DOMfrom parse conversation list directly, close panel and return results.
6
- *
7
- * DOM structure (2026-03-03 Check):
8
- * toggle: [data-past-conversations-toggle="true"]
9
- * panel: input[placeholder="Select a conversation"] near
10
- * section header: .opacity-50 text (Current, Recent, Other)
11
- * row: .cursor-pointer.justify-between.rounded-md
12
- * ├── Title: span > span
13
- * ├── workspace: .opacity-50.truncate > span
14
- * └── time: .opacity-50.flex-shrink-0
15
- */
16
- (async () => {
17
- const sleep = (ms) => new Promise(r => setTimeout(r, ms));
18
-
19
- try {
20
- // 1. toggle click history panel open
21
- const toggle = document.querySelector('[data-past-conversations-toggle="true"]');
22
- if (!toggle) return [];
23
- toggle.click();
24
- await sleep(1000);
25
-
26
- // 2. Exact search input search (placeholder matching)
27
- const allInputs = document.querySelectorAll('input[type="text"]');
28
- let searchInput = null;
29
- for (const inp of allInputs) {
30
- if (inp.placeholder === 'Select a conversation' && inp.offsetWidth > 0) {
31
- searchInput = inp;
32
- break;
33
- }
34
- }
35
-
36
- if (!searchInput) {
37
- document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', code: 'Escape', bubbles: true }));
38
- return [];
39
- }
40
-
41
- // 3. "Current" Search conversation list scroll container based on text
42
- let container = null;
43
- const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT, null);
44
- while (walker.nextNode()) {
45
- if (walker.currentNode.textContent.trim() === 'Current') {
46
- // "Current" text ancestor — climb up to overflow-auto/scroll container
47
- let el = walker.currentNode.parentElement;
48
- for (let i = 0; i < 10 && el; i++) {
49
- const cls = (el.className || '');
50
- if (typeof cls === 'string' && (cls.includes('overflow-auto') || cls.includes('overflow-y-scroll'))) {
51
- container = el;
52
- break;
53
- }
54
- el = el.parentElement;
55
- }
56
- // If overflow container not found, use ancestor with most rows
57
- if (!container) {
58
- el = walker.currentNode.parentElement;
59
- let bestEl = null;
60
- let bestCount = 0;
61
- for (let i = 0; i < 8 && el; i++) {
62
- const rows = el.querySelectorAll('[class*="cursor-pointer"][class*="justify-between"][class*="rounded-md"]');
63
- if (rows.length > bestCount) {
64
- bestCount = rows.length;
65
- bestEl = el;
66
- }
67
- el = el.parentElement;
68
- }
69
- container = bestEl;
70
- }
71
- if (container) break;
72
- }
73
- }
74
-
75
- // fallback: "Current" textwhen absent (new conversation etc. after) searchInput based
76
- if (!container && searchInput) {
77
- let el = searchInput.parentElement;
78
- for (let i = 0; i < 10 && el; i++) {
79
- const cls = (el.className || '');
80
- if (typeof cls === 'string' && (cls.includes('overflow-auto') || cls.includes('overflow-y-scroll'))) {
81
- container = el; break;
82
- }
83
- const rows = el.querySelectorAll('[class*="cursor-pointer"][class*="justify-between"][class*="rounded-md"]');
84
- if (rows.length > 0 && !container) {
85
- container = el;
86
- }
87
- el = el.parentElement;
88
- }
89
- }
90
-
91
- if (!container) {
92
- document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', code: 'Escape', bubbles: true }));
93
- return [];
94
- }
95
-
96
- // 4. conversation row parsing
97
- const rows = container.querySelectorAll('[class*="cursor-pointer"][class*="justify-between"][class*="rounded-md"]');
98
- const chats = [];
99
-
100
- for (const row of rows) {
101
- const titleEl = row.querySelector('span span');
102
- const title = titleEl ? titleEl.textContent.trim() : '';
103
- if (!title) continue;
104
-
105
- const timeEl = row.querySelector('span[class*="opacity-50"][class*="flex-shrink-0"]');
106
- const time = timeEl ? timeEl.textContent.trim() : '';
107
-
108
- const wsEl = row.querySelector('span[class*="opacity-50"][class*="truncate"] span');
109
- const workspace = wsEl ? wsEl.textContent.trim() : '';
110
-
111
- const isCurrent = (row.className || '').includes('focusBackground');
112
-
113
- let section = '';
114
- const sectionHeader = row.parentElement?.querySelector('[class*="opacity-50"]:not([class*="cursor-pointer"])');
115
- if (sectionHeader) {
116
- section = sectionHeader.textContent.trim();
117
- }
118
-
119
- chats.push({
120
- id: title,
121
- title,
122
- status: isCurrent ? 'current' : '',
123
- time,
124
- workspace,
125
- section,
126
- });
127
- }
128
-
129
- // 5. panel close
130
- document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', code: 'Escape', bubbles: true }));
131
-
132
- return chats;
133
- } catch (e) {
134
- try { document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', code: 'Escape', bubbles: true })); } catch (_) { }
135
- return [];
136
- }
137
- })()
@@ -1,61 +0,0 @@
1
- /**
2
- * Antigravity — list_models
3
- * model button + list extract
4
- *
5
- * Version compatibility:
6
- * v0 (old): .flex.min-w-0.max-w-full.cursor-pointer.items-center (exact CSS selector works)
7
- * v1 (new): Tailwind arbitrary values (pl-[0.125rem]) — must use partial class matching
8
- * Both: dropdown items use .px-2.py-1.flex.items-center.justify-between.cursor-pointer
9
- *
10
- * → { models: string[], current: string }
11
- */
12
- (() => {
13
- try {
14
- const models = [];
15
- let current = '';
16
-
17
- // ── Step 1: Dropdown open state — extract item list ──────────────────
18
- // Selector works for both v0 and v1 (hover class changed but cursor-pointer persists)
19
- const items = document.querySelectorAll('.px-2.py-1.flex.items-center.justify-between.cursor-pointer');
20
- for (const item of items) {
21
- const label = item.querySelector('.text-xs.font-medium');
22
- const text = (label || item).textContent?.trim();
23
- if (!text || text.length > 60) continue;
24
- models.push(text);
25
- // Selected item: bg-gray-500/20 (both v0 & v1)
26
- if ((item.className || '').includes('bg-gray-500/20')) {
27
- current = text;
28
- }
29
- }
30
-
31
- // ── Step 2: Dropdown closed — extract current model from trigger ──────
32
- if (models.length === 0) {
33
- // v0: exact class match works
34
- let trigger = document.querySelector('.flex.min-w-0.max-w-full.cursor-pointer.items-center');
35
-
36
- // v1: arbitrary Tailwind classes → partial matching
37
- if (!trigger || trigger.offsetWidth === 0) {
38
- trigger = [...document.querySelectorAll('div, button')].find(e => {
39
- const cls = e.className || '';
40
- return cls.includes('min-w-0') &&
41
- cls.includes('max-w-full') &&
42
- cls.includes('cursor-pointer') &&
43
- cls.includes('items-center') &&
44
- e.offsetWidth > 0;
45
- }) || null;
46
- }
47
-
48
- if (trigger) {
49
- // v0: .text-xs.font-medium span / v1: .text-xs span with opacity-70
50
- const span = trigger.querySelector('.text-xs.font-medium') ||
51
- trigger.querySelector('span.text-xs') ||
52
- trigger;
53
- current = span.textContent?.trim() || '';
54
- }
55
- }
56
-
57
- return JSON.stringify({ models, current });
58
- } catch (e) {
59
- return JSON.stringify({ models: [], current: '', error: e.message });
60
- }
61
- })()