@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.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +87 -89
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/detection/ide-detector.ts +1 -1
- package/src/providers/provider-loader.ts +3 -6
- package/providers/_builtin/.github/workflows/generate-registry.yml +0 -76
- package/providers/_builtin/COMPATIBILITY.md +0 -217
- package/providers/_builtin/CONTRIBUTING.md +0 -200
- package/providers/_builtin/README.md +0 -119
- package/providers/_builtin/_helpers/index.js +0 -188
- package/providers/_builtin/acp/agentpool/provider.json +0 -54
- package/providers/_builtin/acp/amp/provider.json +0 -52
- package/providers/_builtin/acp/auggie/provider.json +0 -57
- package/providers/_builtin/acp/autodev/provider.json +0 -54
- package/providers/_builtin/acp/autohand/provider.json +0 -52
- package/providers/_builtin/acp/blackbox-ai/provider.json +0 -54
- package/providers/_builtin/acp/claude-agent/provider.json +0 -57
- package/providers/_builtin/acp/cline-acp/provider.json +0 -54
- package/providers/_builtin/acp/codebuddy/provider.json +0 -54
- package/providers/_builtin/acp/codex-cli/provider.json +0 -57
- package/providers/_builtin/acp/corust-agent/provider.json +0 -52
- package/providers/_builtin/acp/crow-cli/provider.json +0 -54
- package/providers/_builtin/acp/cursor-acp/provider.json +0 -54
- package/providers/_builtin/acp/deepagents/provider.json +0 -52
- package/providers/_builtin/acp/dimcode/provider.json +0 -54
- package/providers/_builtin/acp/docker-cagent/provider.json +0 -57
- package/providers/_builtin/acp/factory-droid/provider.json +0 -60
- package/providers/_builtin/acp/fast-agent/provider.json +0 -52
- package/providers/_builtin/acp/gemini-cli/provider.json +0 -114
- package/providers/_builtin/acp/github-copilot/provider.json +0 -54
- package/providers/_builtin/acp/goose/provider.json +0 -57
- package/providers/_builtin/acp/junie/provider.json +0 -52
- package/providers/_builtin/acp/kilo/provider.json +0 -54
- package/providers/_builtin/acp/kimi-cli/provider.json +0 -57
- package/providers/_builtin/acp/minion-code/provider.json +0 -52
- package/providers/_builtin/acp/mistral-vibe/provider.json +0 -57
- package/providers/_builtin/acp/nova/provider.json +0 -54
- package/providers/_builtin/acp/openclaw/provider.json +0 -54
- package/providers/_builtin/acp/opencode/provider.json +0 -52
- package/providers/_builtin/acp/openhands/provider.json +0 -54
- package/providers/_builtin/acp/pi-acp/provider.json +0 -52
- package/providers/_builtin/acp/qoder/provider.json +0 -54
- package/providers/_builtin/acp/qwen-code/provider.json +0 -60
- package/providers/_builtin/acp/stakpak/provider.json +0 -54
- package/providers/_builtin/acp/vtcode/provider.json +0 -54
- package/providers/_builtin/cli/aider-cli/provider.json +0 -37
- package/providers/_builtin/cli/aider-cli/scripts/1.0/detect_status.js +0 -20
- package/providers/_builtin/cli/aider-cli/scripts/1.0/parse_approval.js +0 -10
- package/providers/_builtin/cli/aider-cli/scripts/1.0/parse_output.js +0 -97
- package/providers/_builtin/cli/aider-cli/scripts/1.0/scripts.js +0 -7
- package/providers/_builtin/cli/claude-cli/provider.json +0 -121
- package/providers/_builtin/cli/claude-cli/scripts/1.0/detect_status.js +0 -83
- package/providers/_builtin/cli/claude-cli/scripts/1.0/parse_approval.js +0 -97
- package/providers/_builtin/cli/claude-cli/scripts/1.0/parse_output.js +0 -417
- package/providers/_builtin/cli/claude-cli/scripts/1.0/scripts.js +0 -42
- package/providers/_builtin/cli/codex-cli/provider.json +0 -90
- package/providers/_builtin/cli/codex-cli/scripts/1.0/detect_status.js +0 -54
- package/providers/_builtin/cli/codex-cli/scripts/1.0/parse_approval.js +0 -91
- package/providers/_builtin/cli/codex-cli/scripts/1.0/parse_output.js +0 -522
- package/providers/_builtin/cli/codex-cli/scripts/1.0/scripts.js +0 -11
- package/providers/_builtin/cli/cursor-cli/provider.json +0 -37
- package/providers/_builtin/cli/cursor-cli/scripts/1.0/detect_status.js +0 -19
- package/providers/_builtin/cli/cursor-cli/scripts/1.0/parse_approval.js +0 -10
- package/providers/_builtin/cli/cursor-cli/scripts/1.0/parse_output.js +0 -48
- package/providers/_builtin/cli/cursor-cli/scripts/1.0/scripts.js +0 -7
- package/providers/_builtin/cli/gemini-cli/provider.json +0 -109
- package/providers/_builtin/cli/gemini-cli/scripts/1.0/detect_status.js +0 -26
- package/providers/_builtin/cli/gemini-cli/scripts/1.0/parse_approval.js +0 -22
- package/providers/_builtin/cli/gemini-cli/scripts/1.0/parse_output.js +0 -71
- package/providers/_builtin/cli/gemini-cli/scripts/1.0/scripts.js +0 -12
- package/providers/_builtin/cli/github-copilot-cli/provider.json +0 -37
- package/providers/_builtin/cli/github-copilot-cli/scripts/1.0/detect_status.js +0 -19
- package/providers/_builtin/cli/github-copilot-cli/scripts/1.0/parse_approval.js +0 -9
- package/providers/_builtin/cli/github-copilot-cli/scripts/1.0/parse_output.js +0 -48
- package/providers/_builtin/cli/github-copilot-cli/scripts/1.0/scripts.js +0 -7
- package/providers/_builtin/cli/goose-cli/provider.json +0 -37
- package/providers/_builtin/cli/goose-cli/scripts/1.0/detect_status.js +0 -20
- package/providers/_builtin/cli/goose-cli/scripts/1.0/parse_approval.js +0 -10
- package/providers/_builtin/cli/goose-cli/scripts/1.0/parse_output.js +0 -48
- package/providers/_builtin/cli/goose-cli/scripts/1.0/scripts.js +0 -7
- package/providers/_builtin/cli/opencode-cli/provider.json +0 -37
- package/providers/_builtin/cli/opencode-cli/scripts/1.0/detect_status.js +0 -15
- package/providers/_builtin/cli/opencode-cli/scripts/1.0/parse_approval.js +0 -9
- package/providers/_builtin/cli/opencode-cli/scripts/1.0/parse_output.js +0 -48
- package/providers/_builtin/cli/opencode-cli/scripts/1.0/scripts.js +0 -7
- package/providers/_builtin/docs/CDP_SELECTOR_GUIDE.md +0 -370
- package/providers/_builtin/docs/PROVIDER_GUIDE.md +0 -916
- package/providers/_builtin/extension/cline/provider.json +0 -37
- package/providers/_builtin/extension/cline/scripts/1.0/focus_editor.js +0 -48
- package/providers/_builtin/extension/cline/scripts/1.0/list_chats.js +0 -100
- package/providers/_builtin/extension/cline/scripts/1.0/list_models.js +0 -43
- package/providers/_builtin/extension/cline/scripts/1.0/list_modes.js +0 -35
- package/providers/_builtin/extension/cline/scripts/1.0/new_session.js +0 -85
- package/providers/_builtin/extension/cline/scripts/1.0/open_panel.js +0 -25
- package/providers/_builtin/extension/cline/scripts/1.0/read_chat.js +0 -270
- package/providers/_builtin/extension/cline/scripts/1.0/resolve_action.js +0 -83
- package/providers/_builtin/extension/cline/scripts/1.0/scripts.js +0 -82
- package/providers/_builtin/extension/cline/scripts/1.0/send_message.js +0 -95
- package/providers/_builtin/extension/cline/scripts/1.0/set_mode.js +0 -36
- package/providers/_builtin/extension/cline/scripts/1.0/set_model.js +0 -36
- package/providers/_builtin/extension/cline/scripts/1.0/switch_session.js +0 -206
- package/providers/_builtin/extension/codex/provider.json +0 -38
- package/providers/_builtin/extension/codex/scripts/1.0/click_conversation_webview.js +0 -24
- package/providers/_builtin/extension/codex/scripts/1.0/explore_chat_webview.js +0 -110
- package/providers/_builtin/extension/codex/scripts/1.0/explore_controls_webview.js +0 -75
- package/providers/_builtin/extension/codex/scripts/1.0/explore_dom.js +0 -58
- package/providers/_builtin/extension/codex/scripts/1.0/explore_dropdown_webview.js +0 -64
- package/providers/_builtin/extension/codex/scripts/1.0/inspect_code_webview.js +0 -55
- package/providers/_builtin/extension/codex/scripts/1.0/list_models.js +0 -63
- package/providers/_builtin/extension/codex/scripts/1.0/list_modes.js +0 -140
- package/providers/_builtin/extension/codex/scripts/1.0/message_structure_webview.js +0 -79
- package/providers/_builtin/extension/codex/scripts/1.0/new_session.js +0 -26
- package/providers/_builtin/extension/codex/scripts/1.0/read_chat.js +0 -516
- package/providers/_builtin/extension/codex/scripts/1.0/resolve_action.js +0 -82
- package/providers/_builtin/extension/codex/scripts/1.0/send_message.js +0 -42
- package/providers/_builtin/extension/codex/scripts/1.0/set_mode.js +0 -165
- package/providers/_builtin/extension/codex/scripts/1.0/set_model.js +0 -86
- package/providers/_builtin/extension/roo-code/provider.json +0 -37
- package/providers/_builtin/extension/roo-code/scripts/1.0/scripts.js +0 -82
- package/providers/_builtin/ide/antigravity/provider.json +0 -88
- package/providers/_builtin/ide/antigravity/scripts/1.0/focus_editor.js +0 -20
- package/providers/_builtin/ide/antigravity/scripts/1.0/list_chats.js +0 -137
- package/providers/_builtin/ide/antigravity/scripts/1.0/list_models.js +0 -61
- package/providers/_builtin/ide/antigravity/scripts/1.0/list_modes.js +0 -72
- package/providers/_builtin/ide/antigravity/scripts/1.0/new_session.js +0 -75
- package/providers/_builtin/ide/antigravity/scripts/1.0/read_chat.js +0 -352
- package/providers/_builtin/ide/antigravity/scripts/1.0/resolve_action.js +0 -63
- package/providers/_builtin/ide/antigravity/scripts/1.0/scripts.js +0 -67
- package/providers/_builtin/ide/antigravity/scripts/1.0/send_message.js +0 -56
- package/providers/_builtin/ide/antigravity/scripts/1.0/set_mode.js +0 -67
- package/providers/_builtin/ide/antigravity/scripts/1.0/set_model.js +0 -72
- package/providers/_builtin/ide/antigravity/scripts/1.0/switch_session.js +0 -114
- package/providers/_builtin/ide/cursor/provider.json +0 -70
- package/providers/_builtin/ide/cursor/scripts/1.0/dismiss_notification.js +0 -30
- package/providers/_builtin/ide/cursor/scripts/1.0/focus_editor.js +0 -13
- package/providers/_builtin/ide/cursor/scripts/1.0/list_models.js +0 -78
- package/providers/_builtin/ide/cursor/scripts/1.0/list_modes.js +0 -40
- package/providers/_builtin/ide/cursor/scripts/1.0/list_notifications.js +0 -23
- package/providers/_builtin/ide/cursor/scripts/1.0/list_sessions.js +0 -42
- package/providers/_builtin/ide/cursor/scripts/1.0/new_session.js +0 -20
- package/providers/_builtin/ide/cursor/scripts/1.0/open_panel.js +0 -23
- package/providers/_builtin/ide/cursor/scripts/1.0/read_chat.js +0 -318
- package/providers/_builtin/ide/cursor/scripts/1.0/resolve_action.js +0 -19
- package/providers/_builtin/ide/cursor/scripts/1.0/scripts.js +0 -78
- package/providers/_builtin/ide/cursor/scripts/1.0/send_message.js +0 -23
- package/providers/_builtin/ide/cursor/scripts/1.0/set_mode.js +0 -38
- package/providers/_builtin/ide/cursor/scripts/1.0/set_model.js +0 -81
- package/providers/_builtin/ide/cursor/scripts/1.0/switch_session.js +0 -28
- package/providers/_builtin/ide/kiro/provider.json +0 -68
- package/providers/_builtin/ide/kiro/scripts/1.0/focus_editor.js +0 -20
- package/providers/_builtin/ide/kiro/scripts/1.0/open_panel.js +0 -47
- package/providers/_builtin/ide/kiro/scripts/1.0/resolve_action.js +0 -54
- package/providers/_builtin/ide/kiro/scripts/1.0/send_message.js +0 -29
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_dump_html.js +0 -1
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_list_models.js +0 -42
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_list_modes.js +0 -22
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_list_sessions.js +0 -21
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_new_session.js +0 -34
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_read_chat.js +0 -161
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_resolve_action.js +0 -62
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_send_message.js +0 -94
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_set_mode.js +0 -34
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_set_model.js +0 -47
- package/providers/_builtin/ide/kiro/scripts/1.0/webview_switch_session.js +0 -26
- package/providers/_builtin/ide/pearai/.tmp/after_rich.json +0 -157
- package/providers/_builtin/ide/pearai/.tmp/after_rich_raw.json +0 -161
- package/providers/_builtin/ide/pearai/.tmp/after_switch.json +0 -592
- package/providers/_builtin/ide/pearai/.tmp/after_switch_raw.json +0 -596
- package/providers/_builtin/ide/pearai/.tmp/home_dump_raw.json +0 -176
- package/providers/_builtin/ide/pearai/.tmp/items_raw.json +0 -778
- package/providers/_builtin/ide/pearai/.tmp/webview_dump.json +0 -157
- package/providers/_builtin/ide/pearai/.tmp/webview_dump_raw.json +0 -161
- package/providers/_builtin/ide/pearai/provider.json +0 -71
- package/providers/_builtin/ide/pearai/scripts/1.0/focus_editor.js +0 -16
- package/providers/_builtin/ide/pearai/scripts/1.0/list_models.js +0 -45
- package/providers/_builtin/ide/pearai/scripts/1.0/list_modes.js +0 -44
- package/providers/_builtin/ide/pearai/scripts/1.0/list_sessions.js +0 -93
- package/providers/_builtin/ide/pearai/scripts/1.0/new_session.js +0 -38
- package/providers/_builtin/ide/pearai/scripts/1.0/open_panel.js +0 -23
- package/providers/_builtin/ide/pearai/scripts/1.0/read_chat.js +0 -169
- package/providers/_builtin/ide/pearai/scripts/1.0/resolve_action.js +0 -60
- package/providers/_builtin/ide/pearai/scripts/1.0/scripts.js +0 -111
- package/providers/_builtin/ide/pearai/scripts/1.0/send_message.js +0 -104
- package/providers/_builtin/ide/pearai/scripts/1.0/set_mode.js +0 -51
- package/providers/_builtin/ide/pearai/scripts/1.0/set_model.js +0 -54
- package/providers/_builtin/ide/pearai/scripts/1.0/switch_session.js +0 -81
- package/providers/_builtin/ide/trae/provider.json +0 -72
- package/providers/_builtin/ide/trae/scripts/1.0/focus_editor.js +0 -20
- package/providers/_builtin/ide/trae/scripts/1.0/list_chats.js +0 -24
- package/providers/_builtin/ide/trae/scripts/1.0/list_models.js +0 -39
- package/providers/_builtin/ide/trae/scripts/1.0/list_modes.js +0 -39
- package/providers/_builtin/ide/trae/scripts/1.0/new_session.js +0 -30
- package/providers/_builtin/ide/trae/scripts/1.0/open_panel.js +0 -44
- package/providers/_builtin/ide/trae/scripts/1.0/read_chat.js +0 -113
- package/providers/_builtin/ide/trae/scripts/1.0/resolve_action.js +0 -54
- package/providers/_builtin/ide/trae/scripts/1.0/scripts.js +0 -82
- package/providers/_builtin/ide/trae/scripts/1.0/send_message.js +0 -69
- package/providers/_builtin/ide/trae/scripts/1.0/set_mode.js +0 -15
- package/providers/_builtin/ide/trae/scripts/1.0/set_model.js +0 -15
- package/providers/_builtin/ide/trae/scripts/1.0/switch_session.js +0 -23
- package/providers/_builtin/ide/vscode/provider.json +0 -74
- package/providers/_builtin/ide/vscode/scripts/1.0/focus_editor.js +0 -1
- package/providers/_builtin/ide/vscode/scripts/1.0/list_models.js +0 -1
- package/providers/_builtin/ide/vscode/scripts/1.0/list_sessions.js +0 -1
- package/providers/_builtin/ide/vscode/scripts/1.0/new_session.js +0 -1
- package/providers/_builtin/ide/vscode/scripts/1.0/open_panel.js +0 -1
- package/providers/_builtin/ide/vscode/scripts/1.0/read_chat.js +0 -1
- package/providers/_builtin/ide/vscode/scripts/1.0/resolve_action.js +0 -1
- package/providers/_builtin/ide/vscode/scripts/1.0/scripts.js +0 -25
- package/providers/_builtin/ide/vscode/scripts/1.0/send_message.js +0 -1
- package/providers/_builtin/ide/vscode/scripts/1.0/set_model.js +0 -1
- package/providers/_builtin/ide/vscode/scripts/1.0/switch_session.js +0 -1
- package/providers/_builtin/ide/vscode-insiders/provider.json +0 -68
- package/providers/_builtin/ide/vscodium/provider.json +0 -69
- package/providers/_builtin/ide/windsurf/provider.json +0 -57
- package/providers/_builtin/ide/windsurf/scripts/1.0/focus_editor.js +0 -36
- package/providers/_builtin/ide/windsurf/scripts/1.0/list_chats.js +0 -23
- package/providers/_builtin/ide/windsurf/scripts/1.0/list_models.js +0 -56
- package/providers/_builtin/ide/windsurf/scripts/1.0/list_modes.js +0 -63
- package/providers/_builtin/ide/windsurf/scripts/1.0/list_sessions.js +0 -79
- package/providers/_builtin/ide/windsurf/scripts/1.0/new_session.js +0 -58
- package/providers/_builtin/ide/windsurf/scripts/1.0/open_panel.js +0 -67
- package/providers/_builtin/ide/windsurf/scripts/1.0/read_chat.js +0 -253
- package/providers/_builtin/ide/windsurf/scripts/1.0/resolve_action.js +0 -82
- package/providers/_builtin/ide/windsurf/scripts/1.0/scripts.js +0 -82
- package/providers/_builtin/ide/windsurf/scripts/1.0/send_message.js +0 -20
- package/providers/_builtin/ide/windsurf/scripts/1.0/set_mode.js +0 -43
- package/providers/_builtin/ide/windsurf/scripts/1.0/set_model.js +0 -49
- package/providers/_builtin/ide/windsurf/scripts/1.0/switch_session.js +0 -82
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/focus_editor.js +0 -30
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/list_chats.js +0 -117
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/list_models.js +0 -39
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/list_modes.js +0 -39
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/new_session.js +0 -69
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/open_panel.js +0 -58
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/read_chat.js +0 -315
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/resolve_action.js +0 -68
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/scripts.js +0 -82
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/send_message.js +0 -87
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/set_mode.js +0 -15
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/set_model.js +0 -15
- package/providers/_builtin/ide/windsurf/scripts/1.0.bak/switch_session.js +0 -58
- package/providers/_builtin/registry.json +0 -376
- package/providers/_builtin/validate.js +0 -156
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Antigravity v1 — send_message
|
|
3
|
-
*
|
|
4
|
-
* Antigravity contenteditable div[role="textbox"] use.
|
|
5
|
-
* Multiple contenteditablemay exist, so select the one with largest y coordinate (main chat).
|
|
6
|
-
*
|
|
7
|
-
* ⚠️ Enter event composed: true + which (Shadow DOM crossing boundary + React compatibility)
|
|
8
|
-
* ⚠️ keydown + keypress + keyup full sequence needed
|
|
9
|
-
*
|
|
10
|
-
* Parameter: ${ MESSAGE }
|
|
11
|
-
* final Check: 2026-03-10
|
|
12
|
-
*/
|
|
13
|
-
(async () => {
|
|
14
|
-
try {
|
|
15
|
-
const msg = ${ MESSAGE };
|
|
16
|
-
|
|
17
|
-
// ─── 1. Find main chat input field ───
|
|
18
|
-
const editors = document.querySelectorAll('[contenteditable="true"][role="textbox"]');
|
|
19
|
-
if (!editors.length) return 'error: no contenteditable textbox found';
|
|
20
|
-
|
|
21
|
-
// y (bottom of screen = chat) editor Select
|
|
22
|
-
const editor = [...editors].reduce((a, b) =>
|
|
23
|
-
b.getBoundingClientRect().y > a.getBoundingClientRect().y ? b : a
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
// ─── 2. text insertion ───
|
|
27
|
-
editor.focus();
|
|
28
|
-
|
|
29
|
-
// content delete
|
|
30
|
-
document.execCommand('selectAll', false, null);
|
|
31
|
-
document.execCommand('delete', false, null);
|
|
32
|
-
|
|
33
|
-
// text insertion
|
|
34
|
-
document.execCommand('insertText', false, msg);
|
|
35
|
-
|
|
36
|
-
// Reactnotify changes to
|
|
37
|
-
editor.dispatchEvent(new Event('input', { bubbles: true }));
|
|
38
|
-
|
|
39
|
-
await new Promise(r => setTimeout(r, 300));
|
|
40
|
-
|
|
41
|
-
// ─── 3. Enter key sending (full sequence) ───
|
|
42
|
-
const enterOpts = {
|
|
43
|
-
key: 'Enter', code: 'Enter',
|
|
44
|
-
keyCode: 13, which: 13,
|
|
45
|
-
bubbles: true, cancelable: true, composed: true,
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
editor.dispatchEvent(new KeyboardEvent('keydown', enterOpts));
|
|
49
|
-
editor.dispatchEvent(new KeyboardEvent('keypress', enterOpts));
|
|
50
|
-
editor.dispatchEvent(new KeyboardEvent('keyup', enterOpts));
|
|
51
|
-
|
|
52
|
-
return 'sent';
|
|
53
|
-
} catch (e) {
|
|
54
|
-
return 'error: ' + e.message;
|
|
55
|
-
}
|
|
56
|
-
})()
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Antigravity — set_mode [>= 1.107.0]
|
|
3
|
-
* mode trigger: BUTTON with py-1 pl-1 pr-2 opacity-70
|
|
4
|
-
* ${MODE} → JSON.stringify(modeName)
|
|
5
|
-
* → { success: boolean, mode?: string }
|
|
6
|
-
*/
|
|
7
|
-
(async () => {
|
|
8
|
-
try {
|
|
9
|
-
const target = ${MODE};
|
|
10
|
-
|
|
11
|
-
// ── Helper: find mode button ──────────────────────────────────────────
|
|
12
|
-
function findModeBtn() {
|
|
13
|
-
return [...document.querySelectorAll('button')].find(b => {
|
|
14
|
-
const cls = b.className || '';
|
|
15
|
-
return cls.includes('py-1') &&
|
|
16
|
-
cls.includes('pl-1') &&
|
|
17
|
-
cls.includes('pr-2') &&
|
|
18
|
-
cls.includes('opacity-70') &&
|
|
19
|
-
b.offsetWidth > 0;
|
|
20
|
-
}) || null;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// ── Helper: click item in open "Conversation mode" panel ─────────────
|
|
24
|
-
function clickModeItem(targetName) {
|
|
25
|
-
const headers = document.querySelectorAll('.text-xs.px-2.pb-1.opacity-80');
|
|
26
|
-
for (const header of headers) {
|
|
27
|
-
if (header.textContent?.trim() === 'Conversation mode') {
|
|
28
|
-
const parent = header.parentElement;
|
|
29
|
-
if (!parent) continue;
|
|
30
|
-
for (const item of parent.querySelectorAll('.font-medium')) {
|
|
31
|
-
const text = item.textContent?.trim();
|
|
32
|
-
if (text && text.toLowerCase() === targetName.toLowerCase()) {
|
|
33
|
-
item.click();
|
|
34
|
-
return text;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
break;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// ── Step 1: Panel already open — direct click ─────────────────────────
|
|
44
|
-
const direct = clickModeItem(target);
|
|
45
|
-
if (direct) {
|
|
46
|
-
await new Promise(r => setTimeout(r, 300));
|
|
47
|
-
return JSON.stringify({ success: true, mode: direct });
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// ── Step 2: Open panel via mode button, then click ───────────────────
|
|
51
|
-
const modeBtn = findModeBtn();
|
|
52
|
-
if (modeBtn) {
|
|
53
|
-
modeBtn.click();
|
|
54
|
-
await new Promise(r => setTimeout(r, 400));
|
|
55
|
-
|
|
56
|
-
const hit = clickModeItem(target);
|
|
57
|
-
if (hit) {
|
|
58
|
-
return JSON.stringify({ success: true, mode: hit });
|
|
59
|
-
}
|
|
60
|
-
modeBtn.click(); // Close if not found
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return JSON.stringify({ success: false, error: 'mode not found: ' + target });
|
|
64
|
-
} catch (e) {
|
|
65
|
-
return JSON.stringify({ success: false, error: e.message });
|
|
66
|
-
}
|
|
67
|
-
})()
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Antigravity — set_model
|
|
3
|
-
* model from Select model
|
|
4
|
-
*
|
|
5
|
-
* Version compatibility:
|
|
6
|
-
* v0 (old): .flex.min-w-0.max-w-full.cursor-pointer.items-center trigger
|
|
7
|
-
* v1 (new): Tailwind arbitrary values → partial matching required
|
|
8
|
-
* Both: dropdown items .px-2.py-1.flex.items-center.justify-between.cursor-pointer
|
|
9
|
-
*
|
|
10
|
-
* ${MODEL} → JSON.stringify(modelName)
|
|
11
|
-
* → { success: boolean, model?: string }
|
|
12
|
-
*/
|
|
13
|
-
(async () => {
|
|
14
|
-
try {
|
|
15
|
-
const target = ${MODEL};
|
|
16
|
-
|
|
17
|
-
// ── Helper: find model trigger button (v0 + v1 compat) ───────────────
|
|
18
|
-
function findModelTrigger() {
|
|
19
|
-
// v0: exact selector
|
|
20
|
-
const v0 = document.querySelector('.flex.min-w-0.max-w-full.cursor-pointer.items-center');
|
|
21
|
-
if (v0 && v0.offsetWidth > 0) return v0;
|
|
22
|
-
// v1: partial matching
|
|
23
|
-
return [...document.querySelectorAll('div, button')].find(e => {
|
|
24
|
-
const cls = e.className || '';
|
|
25
|
-
return cls.includes('min-w-0') &&
|
|
26
|
-
cls.includes('max-w-full') &&
|
|
27
|
-
cls.includes('cursor-pointer') &&
|
|
28
|
-
cls.includes('items-center') &&
|
|
29
|
-
e.offsetWidth > 0;
|
|
30
|
-
}) || null;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// ── Helper: find and click a model from open dropdown ────────────────
|
|
34
|
-
function clickModelItem(targetName) {
|
|
35
|
-
const items = document.querySelectorAll('.px-2.py-1.flex.items-center.justify-between.cursor-pointer');
|
|
36
|
-
for (const item of items) {
|
|
37
|
-
const label = item.querySelector('.text-xs.font-medium');
|
|
38
|
-
const text = (label || item).textContent?.trim();
|
|
39
|
-
if (text && (text === targetName || text.toLowerCase().includes(targetName.toLowerCase()))) {
|
|
40
|
-
item.click();
|
|
41
|
-
return text;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// ── Step 1: Dropdown already open — try direct click ─────────────────
|
|
48
|
-
const directHit = clickModelItem(target);
|
|
49
|
-
if (directHit) {
|
|
50
|
-
await new Promise(r => setTimeout(r, 200));
|
|
51
|
-
return JSON.stringify({ success: true, model: directHit });
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// ── Step 2: Dropdown closed — open trigger, then select ──────────────
|
|
55
|
-
const trigger = findModelTrigger();
|
|
56
|
-
if (trigger) {
|
|
57
|
-
trigger.click();
|
|
58
|
-
await new Promise(r => setTimeout(r, 400));
|
|
59
|
-
|
|
60
|
-
const hit = clickModelItem(target);
|
|
61
|
-
if (hit) {
|
|
62
|
-
return JSON.stringify({ success: true, model: hit });
|
|
63
|
-
}
|
|
64
|
-
// Close dropdown if target not found
|
|
65
|
-
trigger.click();
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
return JSON.stringify({ success: false, error: 'model not found: ' + target });
|
|
69
|
-
} catch (e) {
|
|
70
|
-
return JSON.stringify({ success: false, error: e.message });
|
|
71
|
-
}
|
|
72
|
-
})()
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Antigravity v1 — switch_session (v7 — CDP click Return)
|
|
3
|
-
*
|
|
4
|
-
* ⚠️ delete button(trash SVG)never accessed.
|
|
5
|
-
*
|
|
6
|
-
* two types mode:
|
|
7
|
-
* 1) Open history toggle and if row coordinates found {clickX, clickY} Return → daemon handles via CDP click
|
|
8
|
-
* 2) workspace row Return ( Select)
|
|
9
|
-
*
|
|
10
|
-
* Parameter: ${SESSION_ID} — conversation title ()
|
|
11
|
-
*/
|
|
12
|
-
(async () => {
|
|
13
|
-
const sleep = (ms) => new Promise(r => setTimeout(r, ms));
|
|
14
|
-
const id = ${SESSION_ID};
|
|
15
|
-
|
|
16
|
-
try {
|
|
17
|
-
// 1. history toggle click
|
|
18
|
-
const toggle = document.querySelector('[data-past-conversations-toggle="true"]');
|
|
19
|
-
if (!toggle) return JSON.stringify({ error: 'no_toggle' });
|
|
20
|
-
toggle.click();
|
|
21
|
-
await sleep(1200);
|
|
22
|
-
|
|
23
|
-
// 2. Container search ( : "Current" text or "Select a conversation" input)
|
|
24
|
-
let container = null;
|
|
25
|
-
|
|
26
|
-
// 2a. "Current" text-based
|
|
27
|
-
const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT, null);
|
|
28
|
-
while (walker.nextNode()) {
|
|
29
|
-
if (walker.currentNode.textContent.trim() === 'Current') {
|
|
30
|
-
let el = walker.currentNode.parentElement;
|
|
31
|
-
for (let i = 0; i < 10 && el; i++) {
|
|
32
|
-
const cls = (el.className || '');
|
|
33
|
-
if (typeof cls === 'string' && (cls.includes('overflow-auto') || cls.includes('overflow-y-scroll'))) {
|
|
34
|
-
container = el; break;
|
|
35
|
-
}
|
|
36
|
-
el = el.parentElement;
|
|
37
|
-
}
|
|
38
|
-
if (!container) {
|
|
39
|
-
el = walker.currentNode.parentElement;
|
|
40
|
-
let bestEl = null, bestCount = 0;
|
|
41
|
-
for (let i = 0; i < 8 && el; i++) {
|
|
42
|
-
const rows = el.querySelectorAll('[class*="cursor-pointer"][class*="justify-between"][class*="rounded-md"]');
|
|
43
|
-
if (rows.length > bestCount) { bestCount = rows.length; bestEl = el; }
|
|
44
|
-
el = el.parentElement;
|
|
45
|
-
}
|
|
46
|
-
container = bestEl;
|
|
47
|
-
}
|
|
48
|
-
if (container) break;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// 2b. fallback: "Select a conversation" input based
|
|
53
|
-
if (!container) {
|
|
54
|
-
const searchInput = Array.from(document.querySelectorAll('input[type="text"]'))
|
|
55
|
-
.find(i => i.offsetWidth > 0 && (i.placeholder || '').includes('Select a conversation'));
|
|
56
|
-
if (searchInput) {
|
|
57
|
-
let el = searchInput.parentElement;
|
|
58
|
-
for (let i = 0; i < 10 && el; i++) {
|
|
59
|
-
const cls = (el.className || '');
|
|
60
|
-
if (typeof cls === 'string' && (cls.includes('overflow-auto') || cls.includes('overflow-y-scroll'))) {
|
|
61
|
-
container = el; break;
|
|
62
|
-
}
|
|
63
|
-
const rows = el.querySelectorAll('[class*="cursor-pointer"][class*="justify-between"][class*="rounded-md"]');
|
|
64
|
-
if (rows.length > 0 && !container) container = el;
|
|
65
|
-
el = el.parentElement;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (!container) {
|
|
71
|
-
document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', code: 'Escape', bubbles: true }));
|
|
72
|
-
return JSON.stringify({ error: 'no_container' });
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// 3. row matching
|
|
76
|
-
const rows = container.querySelectorAll('[class*="cursor-pointer"][class*="justify-between"][class*="rounded-md"]');
|
|
77
|
-
const norm = s => (s || '').trim().toLowerCase().replace(/\s+/g, ' ');
|
|
78
|
-
const idNorm = norm(id);
|
|
79
|
-
let targetRow = null;
|
|
80
|
-
|
|
81
|
-
for (const row of rows) {
|
|
82
|
-
// Skip currently active conversation
|
|
83
|
-
if ((row.className || '').includes('focusBackground')) continue;
|
|
84
|
-
const titleEl = row.querySelector('span span');
|
|
85
|
-
const title = titleEl ? norm(titleEl.textContent) : '';
|
|
86
|
-
if (!title) continue;
|
|
87
|
-
if (title.includes(idNorm) || idNorm.includes(title)) {
|
|
88
|
-
targetRow = row;
|
|
89
|
-
break;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
if (!targetRow) {
|
|
94
|
-
document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', code: 'Escape', bubbles: true }));
|
|
95
|
-
return JSON.stringify({ error: 'no_match', rowCount: rows.length });
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
// 4. row calculation → daemon CDP Input.dispatchMouseEvent click
|
|
99
|
-
const rect = targetRow.getBoundingClientRect();
|
|
100
|
-
const clickX = Math.round(rect.left + rect.width * 0.3);
|
|
101
|
-
const clickY = Math.round(rect.top + rect.height / 2);
|
|
102
|
-
|
|
103
|
-
return JSON.stringify({
|
|
104
|
-
action: 'click',
|
|
105
|
-
clickX,
|
|
106
|
-
clickY,
|
|
107
|
-
title: (targetRow.querySelector('span span')?.textContent || '').substring(0, 60)
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
} catch (e) {
|
|
111
|
-
try { document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', code: 'Escape', bubbles: true })); } catch (_) { }
|
|
112
|
-
return JSON.stringify({ error: e.message });
|
|
113
|
-
}
|
|
114
|
-
})()
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "cursor",
|
|
3
|
-
"name": "Cursor",
|
|
4
|
-
"category": "ide",
|
|
5
|
-
"displayName": "Cursor",
|
|
6
|
-
"icon": "⚡",
|
|
7
|
-
"cli": "cursor",
|
|
8
|
-
"cdpPorts": [
|
|
9
|
-
9333,
|
|
10
|
-
9334
|
|
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": "Cursor",
|
|
19
|
-
"win32": [
|
|
20
|
-
"Cursor.exe"
|
|
21
|
-
]
|
|
22
|
-
},
|
|
23
|
-
"paths": {
|
|
24
|
-
"darwin": [
|
|
25
|
-
"/Applications/Cursor.app"
|
|
26
|
-
],
|
|
27
|
-
"win32": [
|
|
28
|
-
"C:\\Users\\*\\AppData\\Local\\Programs\\cursor\\Cursor.exe"
|
|
29
|
-
],
|
|
30
|
-
"linux": [
|
|
31
|
-
"/opt/Cursor",
|
|
32
|
-
"/usr/share/cursor"
|
|
33
|
-
]
|
|
34
|
-
},
|
|
35
|
-
"inputMethod": "cdp-type-and-send",
|
|
36
|
-
"inputSelector": ".aislash-editor-input[contenteditable=\"true\"]",
|
|
37
|
-
"versionCommand": "cursor --version",
|
|
38
|
-
"providerVersion": "1.0.0",
|
|
39
|
-
"compatibility": [
|
|
40
|
-
{ "ideVersion": ">=1.0.0", "scriptDir": "scripts/1.0" }
|
|
41
|
-
],
|
|
42
|
-
"defaultScriptDir": "scripts/1.0",
|
|
43
|
-
"vscodeCommands": {
|
|
44
|
-
"changeModel": "cursor.model"
|
|
45
|
-
},
|
|
46
|
-
"settings": {
|
|
47
|
-
"approvalAlert": {
|
|
48
|
-
"type": "boolean",
|
|
49
|
-
"default": true,
|
|
50
|
-
"public": true,
|
|
51
|
-
"label": "Approval Notifications",
|
|
52
|
-
"description": "Show notification when approval is needed"
|
|
53
|
-
},
|
|
54
|
-
"longGeneratingAlert": {
|
|
55
|
-
"type": "boolean",
|
|
56
|
-
"default": true,
|
|
57
|
-
"public": true,
|
|
58
|
-
"label": "Long Generation Alert",
|
|
59
|
-
"description": "Alert when generation takes too long"
|
|
60
|
-
},
|
|
61
|
-
"longGeneratingThresholdSec": {
|
|
62
|
-
"type": "number",
|
|
63
|
-
"default": 180,
|
|
64
|
-
"public": true,
|
|
65
|
-
"label": "Long Generation Threshold (sec)",
|
|
66
|
-
"min": 30,
|
|
67
|
-
"max": 600
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cursor — dismiss_notification
|
|
3
|
-
*
|
|
4
|
-
* Close notification toast / click button:
|
|
5
|
-
* Select target by index or message matching
|
|
6
|
-
* Click specified button text, otherwise close
|
|
7
|
-
*
|
|
8
|
-
* params.index: number, params.button: string|null, params.message: string|null
|
|
9
|
-
* → { dismissed: true/false }
|
|
10
|
-
*/
|
|
11
|
-
(params) => {
|
|
12
|
-
try {
|
|
13
|
-
const toasts = [...document.querySelectorAll('.notifications-toasts .notification-toast, .notification-list-item')].filter(t => t.offsetWidth > 0);
|
|
14
|
-
let toast;
|
|
15
|
-
if (params.message) {
|
|
16
|
-
toast = toasts.find(t => (t.querySelector('.notification-list-item-message')?.textContent || t.textContent || '').toLowerCase().includes(params.message.toLowerCase()));
|
|
17
|
-
} else {
|
|
18
|
-
toast = toasts[params.index || 0];
|
|
19
|
-
}
|
|
20
|
-
if (!toast) return JSON.stringify({ dismissed: false, error: 'Toast not found', count: toasts.length });
|
|
21
|
-
if (params.button) {
|
|
22
|
-
const btn = [...toast.querySelectorAll('button')].find(b => b.textContent?.trim().toLowerCase().includes(params.button.toLowerCase()));
|
|
23
|
-
if (btn) { btn.click(); return JSON.stringify({ dismissed: true, clicked: btn.textContent.trim() }); }
|
|
24
|
-
return JSON.stringify({ dismissed: false, error: 'Button not found' });
|
|
25
|
-
}
|
|
26
|
-
const closeBtn = toast.querySelector('.codicon-notifications-clear, .clear-notification-action, .codicon-close');
|
|
27
|
-
if (closeBtn) { closeBtn.click(); return JSON.stringify({ dismissed: true }); }
|
|
28
|
-
return JSON.stringify({ dismissed: false, error: 'Close button not found' });
|
|
29
|
-
} catch(e) { return JSON.stringify({ dismissed: false, error: e.message }); }
|
|
30
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cursor — focus_editor
|
|
3
|
-
*
|
|
4
|
-
* Focus chat input field:
|
|
5
|
-
* .aislash-editor-input[contenteditable="true"]
|
|
6
|
-
*/
|
|
7
|
-
(() => {
|
|
8
|
-
try {
|
|
9
|
-
const input = document.querySelector('.aislash-editor-input[contenteditable="true"]');
|
|
10
|
-
if (input) { input.focus(); return JSON.stringify({ focused: true }); }
|
|
11
|
-
return JSON.stringify({ focused: false, error: 'Input not found' });
|
|
12
|
-
} catch(e) { return JSON.stringify({ focused: false, error: e.message }); }
|
|
13
|
-
})()
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cursor — list_models
|
|
3
|
-
*
|
|
4
|
-
* model list extract:
|
|
5
|
-
* button: .composer-unified-dropdown-model
|
|
6
|
-
* : [data-testid="model-picker-menu"]
|
|
7
|
-
* : .composer-unified-context-menu-item
|
|
8
|
-
* model name: .monaco-highlighted-label
|
|
9
|
-
* Think mode: codicon-br (brain) icon
|
|
10
|
-
* Auto toggle: rounded-full 24x14 element
|
|
11
|
-
*
|
|
12
|
-
* → { models[], current }
|
|
13
|
-
*/
|
|
14
|
-
(async () => {
|
|
15
|
-
try {
|
|
16
|
-
let current = '';
|
|
17
|
-
const models = [];
|
|
18
|
-
|
|
19
|
-
const modelBtn = document.querySelector('.composer-unified-dropdown-model');
|
|
20
|
-
if (modelBtn) {
|
|
21
|
-
current = modelBtn.textContent?.trim() || '';
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Open dropdown
|
|
25
|
-
if (modelBtn) {
|
|
26
|
-
modelBtn.click();
|
|
27
|
-
await new Promise(r => setTimeout(r, 500));
|
|
28
|
-
|
|
29
|
-
const menu = document.querySelector('[data-testid="model-picker-menu"]');
|
|
30
|
-
if (menu) {
|
|
31
|
-
// Auto toggle Check turn off
|
|
32
|
-
const autoItem = menu.querySelector('.composer-unified-context-menu-item[data-is-selected="true"]');
|
|
33
|
-
const autoToggle = autoItem ? [...autoItem.querySelectorAll('[class*="rounded-full"]')].find(el => el.offsetWidth === 24 && el.offsetHeight === 14) : null;
|
|
34
|
-
let wasAutoOn = false;
|
|
35
|
-
if (autoToggle) {
|
|
36
|
-
const bgStyle = autoToggle.getAttribute('style') || '';
|
|
37
|
-
wasAutoOn = bgStyle.includes('green');
|
|
38
|
-
if (wasAutoOn) {
|
|
39
|
-
autoToggle.click();
|
|
40
|
-
await new Promise(r => setTimeout(r, 500));
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// Model list (Auto turned off state)
|
|
45
|
-
const refreshedMenu = document.querySelector('[data-testid="model-picker-menu"]');
|
|
46
|
-
if (refreshedMenu) {
|
|
47
|
-
const items = refreshedMenu.querySelectorAll('.composer-unified-context-menu-item');
|
|
48
|
-
for (const item of items) {
|
|
49
|
-
const nameEl = item.querySelector('.monaco-highlighted-label');
|
|
50
|
-
const name = nameEl?.textContent?.trim() || '';
|
|
51
|
-
if (name && name !== 'Add Models') {
|
|
52
|
-
const hasBrain = !!item.querySelector('[class*="codicon-br"]');
|
|
53
|
-
const displayName = hasBrain ? name + ' 🧠' : name;
|
|
54
|
-
models.push({ name: displayName, id: displayName });
|
|
55
|
-
if (item.getAttribute('data-is-selected') === 'true') current = displayName;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// Auto Turn on again (restore original state)
|
|
61
|
-
if (wasAutoOn) {
|
|
62
|
-
const newMenu = document.querySelector('[data-testid="model-picker-menu"]');
|
|
63
|
-
const newAutoItem = newMenu?.querySelector('.composer-unified-context-menu-item');
|
|
64
|
-
const newToggle = newAutoItem ? [...newAutoItem.querySelectorAll('[class*="rounded-full"]')].find(el => el.offsetWidth === 24) : null;
|
|
65
|
-
if (newToggle) {
|
|
66
|
-
newToggle.click();
|
|
67
|
-
await new Promise(r => setTimeout(r, 200));
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// close (Escape)
|
|
73
|
-
document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return JSON.stringify({ models, current });
|
|
77
|
-
} catch(e) { return JSON.stringify({ models: [], current: '', error: e.message }); }
|
|
78
|
-
})()
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cursor — list_modes
|
|
3
|
-
*
|
|
4
|
-
* mode list extract:
|
|
5
|
-
* button: .composer-unified-dropdown (model )
|
|
6
|
-
* : [data-testid="model-picker-menu"] or .typeahead-popover
|
|
7
|
-
* : .composer-unified-context-menu-item
|
|
8
|
-
*
|
|
9
|
-
* → { modes[], current }
|
|
10
|
-
*/
|
|
11
|
-
(async () => {
|
|
12
|
-
try {
|
|
13
|
-
const modes = [];
|
|
14
|
-
let current = '';
|
|
15
|
-
|
|
16
|
-
const modeBtn = document.querySelector('.composer-unified-dropdown:not(.composer-unified-dropdown-model)');
|
|
17
|
-
if (!modeBtn) return JSON.stringify({ modes: [], current: '', error: 'Mode button not found' });
|
|
18
|
-
|
|
19
|
-
modeBtn.click();
|
|
20
|
-
await new Promise(r => setTimeout(r, 500));
|
|
21
|
-
|
|
22
|
-
const menu = document.querySelector('[data-testid="model-picker-menu"]') || document.querySelector('.typeahead-popover');
|
|
23
|
-
if (menu) {
|
|
24
|
-
const items = menu.querySelectorAll('.composer-unified-context-menu-item');
|
|
25
|
-
for (const item of items) {
|
|
26
|
-
const nameEl = item.querySelector('.monaco-highlighted-label');
|
|
27
|
-
const name = nameEl?.textContent?.trim() || '';
|
|
28
|
-
if (name) {
|
|
29
|
-
modes.push({ name, id: name });
|
|
30
|
-
if (item.getAttribute('data-is-selected') === 'true') current = name;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// close
|
|
36
|
-
document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));
|
|
37
|
-
|
|
38
|
-
return JSON.stringify({ modes, current });
|
|
39
|
-
} catch(e) { return JSON.stringify({ modes: [], current: '', error: e.message }); }
|
|
40
|
-
})()
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cursor — list_notifications
|
|
3
|
-
*
|
|
4
|
-
* VS Code notification toast list:
|
|
5
|
-
* .notifications-toasts .notification-toast
|
|
6
|
-
* .notification-list-item
|
|
7
|
-
*
|
|
8
|
-
* params.filter: string|null — Message filter
|
|
9
|
-
* → [{ index, message, severity, buttons }]
|
|
10
|
-
*/
|
|
11
|
-
(params) => {
|
|
12
|
-
try {
|
|
13
|
-
const toasts = [...document.querySelectorAll('.notifications-toasts .notification-toast, .notification-list-item')];
|
|
14
|
-
const visible = toasts.filter(t => t.offsetWidth > 0).map((t, i) => ({
|
|
15
|
-
index: i,
|
|
16
|
-
message: t.querySelector('.notification-list-item-message')?.textContent?.trim() || t.textContent?.trim().substring(0, 200),
|
|
17
|
-
severity: t.querySelector('.codicon-error') ? 'error' : t.querySelector('.codicon-warning') ? 'warning' : 'info',
|
|
18
|
-
buttons: [...t.querySelectorAll('.notification-list-item-buttons-container button, .monaco-button')].map(b => b.textContent?.trim()).filter(Boolean),
|
|
19
|
-
}));
|
|
20
|
-
const f = params.filter || null;
|
|
21
|
-
return JSON.stringify(f ? visible.filter(n => n.message.toLowerCase().includes(f.toLowerCase())) : visible);
|
|
22
|
-
} catch(e) { return JSON.stringify([]); }
|
|
23
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cursor — list_sessions
|
|
3
|
-
*
|
|
4
|
-
* Parse sessions from sidebar cell list:
|
|
5
|
-
* Cell: .agent-sidebar-cell
|
|
6
|
-
* Title: .agent-sidebar-cell-text
|
|
7
|
-
* Selection state: data-selected="true"
|
|
8
|
-
* Active ID: [data-composer-id]extracted from
|
|
9
|
-
*
|
|
10
|
-
* → { sessions: [{ id, title, active, index }] }
|
|
11
|
-
*/
|
|
12
|
-
(() => {
|
|
13
|
-
try {
|
|
14
|
-
const sessions = [];
|
|
15
|
-
const cells = [...document.querySelectorAll('.agent-sidebar-cell')];
|
|
16
|
-
const activeComposer = document.querySelector('[data-composer-id]');
|
|
17
|
-
const activeId = activeComposer?.getAttribute('data-composer-id') || null;
|
|
18
|
-
cells.forEach((cell, i) => {
|
|
19
|
-
const titleEl = cell.querySelector('.agent-sidebar-cell-text');
|
|
20
|
-
const title = titleEl?.textContent?.trim() || 'Untitled';
|
|
21
|
-
const isSelected = cell.getAttribute('data-selected') === 'true';
|
|
22
|
-
sessions.push({
|
|
23
|
-
id: isSelected && activeId ? activeId : 'sidebar-' + i,
|
|
24
|
-
title,
|
|
25
|
-
active: isSelected,
|
|
26
|
-
index: i,
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
// If no sidebar cells, fallback to current composer
|
|
30
|
-
if (sessions.length === 0 && activeComposer) {
|
|
31
|
-
sessions.push({
|
|
32
|
-
id: activeId,
|
|
33
|
-
title: (() => { const p = document.title.split(' — '); return p.length >= 2 ? p[p.length - 1] : p[0]; })(),
|
|
34
|
-
active: true,
|
|
35
|
-
index: 0,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
return JSON.stringify({ sessions });
|
|
39
|
-
} catch(e) {
|
|
40
|
-
return JSON.stringify({ sessions: [], error: e.message });
|
|
41
|
-
}
|
|
42
|
-
})()
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cursor — new_session
|
|
3
|
-
*
|
|
4
|
-
* New chat/ button click:
|
|
5
|
-
* a.action-label.codicon-add-two
|
|
6
|
-
* [aria-label*="New Chat"]
|
|
7
|
-
* [aria-label*="New Composer"]
|
|
8
|
-
*
|
|
9
|
-
* → { created: true/false }
|
|
10
|
-
*/
|
|
11
|
-
(() => {
|
|
12
|
-
try {
|
|
13
|
-
const newBtn = [...document.querySelectorAll('a.action-label.codicon-add-two, [aria-label*="New Chat"], [aria-label*="New Composer"]')]
|
|
14
|
-
.find(a => a.offsetWidth > 0);
|
|
15
|
-
if (newBtn) { newBtn.click(); return JSON.stringify({ created: true }); }
|
|
16
|
-
return JSON.stringify({ created: false, error: 'New Chat button not found' });
|
|
17
|
-
} catch(e) {
|
|
18
|
-
return JSON.stringify({ created: false, error: e.message });
|
|
19
|
-
}
|
|
20
|
-
})()
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cursor — open_panel
|
|
3
|
-
*
|
|
4
|
-
* chat/ panel open:
|
|
5
|
-
* 1. If already visible 'visible' Return
|
|
6
|
-
* 2. Find and click Agent/Chat/Composer tab
|
|
7
|
-
*/
|
|
8
|
-
(() => {
|
|
9
|
-
try {
|
|
10
|
-
const sidebar = document.getElementById('workbench.parts.auxiliarybar');
|
|
11
|
-
if (sidebar && sidebar.offsetWidth > 0) {
|
|
12
|
-
const chatView = document.querySelector('[data-composer-id]');
|
|
13
|
-
if (chatView) return JSON.stringify({ opened: true });
|
|
14
|
-
}
|
|
15
|
-
const btns = [...document.querySelectorAll('li.action-item a, button, [role="tab"]')];
|
|
16
|
-
const toggle = btns.find(b => {
|
|
17
|
-
const label = (b.textContent || b.getAttribute('aria-label') || '').toLowerCase();
|
|
18
|
-
return /agent|chat|composer|cursor tab/i.test(label);
|
|
19
|
-
});
|
|
20
|
-
if (toggle) { toggle.click(); return JSON.stringify({ opened: true }); }
|
|
21
|
-
return JSON.stringify({ opened: false, error: 'Panel toggle not found' });
|
|
22
|
-
} catch (e) { return JSON.stringify({ opened: false, error: e.message }); }
|
|
23
|
-
})()
|