adhdev 0.4.0 โ 0.5.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/dist/cli-entrypoint.js +7216 -5706
- package/dist/cli-entrypoint.js.map +1 -1
- package/dist/index.js +7199 -5688
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/providers/_builtin/COMPATIBILITY.md +0 -217
- package/providers/_builtin/CONTRIBUTING.md +0 -141
- package/providers/_builtin/README.md +0 -51
- 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/claude-cli/provider.json +0 -100
- package/providers/_builtin/cli/codex-cli/provider.json +0 -89
- package/providers/_builtin/cli/gemini-cli/provider.json +0 -93
- 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 -35
- package/providers/_builtin/extension/cline/scripts/focus_editor.js +0 -48
- package/providers/_builtin/extension/cline/scripts/list_chats.js +0 -100
- package/providers/_builtin/extension/cline/scripts/list_models.js +0 -43
- package/providers/_builtin/extension/cline/scripts/list_modes.js +0 -35
- package/providers/_builtin/extension/cline/scripts/new_session.js +0 -85
- package/providers/_builtin/extension/cline/scripts/open_panel.js +0 -25
- package/providers/_builtin/extension/cline/scripts/read_chat.js +0 -257
- package/providers/_builtin/extension/cline/scripts/resolve_action.js +0 -83
- package/providers/_builtin/extension/cline/scripts/send_message.js +0 -95
- package/providers/_builtin/extension/cline/scripts/set_mode.js +0 -36
- package/providers/_builtin/extension/cline/scripts/set_model.js +0 -36
- package/providers/_builtin/extension/cline/scripts/switch_session.js +0 -206
- package/providers/_builtin/extension/cline/scripts.js +0 -73
- package/providers/_builtin/extension/roo-code/provider.json +0 -35
- package/providers/_builtin/extension/roo-code/scripts.js +0 -659
- package/providers/_builtin/ide/antigravity/provider.json +0 -63
- package/providers/_builtin/ide/antigravity/scripts/focus_editor.js +0 -20
- package/providers/_builtin/ide/antigravity/scripts/legacy/list_models.js +0 -38
- package/providers/_builtin/ide/antigravity/scripts/legacy/list_modes.js +0 -48
- package/providers/_builtin/ide/antigravity/scripts/legacy/scripts.js +0 -64
- package/providers/_builtin/ide/antigravity/scripts/legacy/set_mode.js +0 -34
- package/providers/_builtin/ide/antigravity/scripts/legacy/set_model.js +0 -47
- package/providers/_builtin/ide/antigravity/scripts/list_chats.js +0 -137
- package/providers/_builtin/ide/antigravity/scripts/list_models.js +0 -61
- package/providers/_builtin/ide/antigravity/scripts/list_modes.js +0 -72
- package/providers/_builtin/ide/antigravity/scripts/new_session.js +0 -75
- package/providers/_builtin/ide/antigravity/scripts/read_chat.js +0 -262
- package/providers/_builtin/ide/antigravity/scripts/resolve_action.js +0 -68
- package/providers/_builtin/ide/antigravity/scripts/send_message.js +0 -56
- package/providers/_builtin/ide/antigravity/scripts/set_mode.js +0 -67
- package/providers/_builtin/ide/antigravity/scripts/set_model.js +0 -72
- package/providers/_builtin/ide/antigravity/scripts/switch_session.js +0 -114
- package/providers/_builtin/ide/antigravity/scripts.js +0 -67
- package/providers/_builtin/ide/cursor/provider.json +0 -59
- package/providers/_builtin/ide/cursor/scripts.js +0 -458
- package/providers/_builtin/ide/kiro/provider.json +0 -60
- package/providers/_builtin/ide/kiro/scripts/focus_editor.js +0 -20
- package/providers/_builtin/ide/kiro/scripts/open_panel.js +0 -47
- package/providers/_builtin/ide/kiro/scripts/resolve_action.js +0 -54
- package/providers/_builtin/ide/kiro/scripts/send_message.js +0 -29
- package/providers/_builtin/ide/kiro/scripts/webview_list_models.js +0 -39
- package/providers/_builtin/ide/kiro/scripts/webview_list_modes.js +0 -39
- package/providers/_builtin/ide/kiro/scripts/webview_list_sessions.js +0 -21
- package/providers/_builtin/ide/kiro/scripts/webview_new_session.js +0 -34
- package/providers/_builtin/ide/kiro/scripts/webview_read_chat.js +0 -68
- package/providers/_builtin/ide/kiro/scripts/webview_send_message.js +0 -72
- package/providers/_builtin/ide/kiro/scripts/webview_set_mode.js +0 -15
- package/providers/_builtin/ide/kiro/scripts/webview_set_model.js +0 -15
- package/providers/_builtin/ide/kiro/scripts/webview_switch_session.js +0 -26
- package/providers/_builtin/ide/kiro/scripts.js +0 -62
- package/providers/_builtin/ide/pearai/provider.json +0 -60
- package/providers/_builtin/ide/pearai/scripts/focus_editor.js +0 -20
- package/providers/_builtin/ide/pearai/scripts/list_sessions.js +0 -38
- package/providers/_builtin/ide/pearai/scripts/new_session.js +0 -55
- package/providers/_builtin/ide/pearai/scripts/open_panel.js +0 -46
- package/providers/_builtin/ide/pearai/scripts/resolve_action.js +0 -54
- package/providers/_builtin/ide/pearai/scripts/send_message.js +0 -29
- package/providers/_builtin/ide/pearai/scripts/webview_list_models.js +0 -43
- package/providers/_builtin/ide/pearai/scripts/webview_list_modes.js +0 -35
- package/providers/_builtin/ide/pearai/scripts/webview_list_sessions.js +0 -62
- package/providers/_builtin/ide/pearai/scripts/webview_new_session.js +0 -49
- package/providers/_builtin/ide/pearai/scripts/webview_read_chat.js +0 -92
- package/providers/_builtin/ide/pearai/scripts/webview_resolve_action.js +0 -59
- package/providers/_builtin/ide/pearai/scripts/webview_send_message.js +0 -72
- package/providers/_builtin/ide/pearai/scripts/webview_set_mode.js +0 -36
- package/providers/_builtin/ide/pearai/scripts/webview_set_model.js +0 -36
- package/providers/_builtin/ide/pearai/scripts/webview_switch_session.js +0 -34
- package/providers/_builtin/ide/pearai/scripts.js +0 -74
- package/providers/_builtin/ide/trae/provider.json +0 -59
- package/providers/_builtin/ide/trae/scripts/focus_editor.js +0 -20
- package/providers/_builtin/ide/trae/scripts/list_chats.js +0 -24
- package/providers/_builtin/ide/trae/scripts/list_models.js +0 -39
- package/providers/_builtin/ide/trae/scripts/list_modes.js +0 -39
- package/providers/_builtin/ide/trae/scripts/new_session.js +0 -30
- package/providers/_builtin/ide/trae/scripts/open_panel.js +0 -44
- package/providers/_builtin/ide/trae/scripts/read_chat.js +0 -113
- package/providers/_builtin/ide/trae/scripts/resolve_action.js +0 -54
- package/providers/_builtin/ide/trae/scripts/send_message.js +0 -69
- package/providers/_builtin/ide/trae/scripts/set_mode.js +0 -15
- package/providers/_builtin/ide/trae/scripts/set_model.js +0 -15
- package/providers/_builtin/ide/trae/scripts/switch_session.js +0 -23
- package/providers/_builtin/ide/trae/scripts.js +0 -57
- package/providers/_builtin/ide/vscode/provider.json +0 -57
- package/providers/_builtin/ide/vscode-insiders/provider.json +0 -55
- package/providers/_builtin/ide/vscodium/provider.json +0 -56
- package/providers/_builtin/ide/windsurf/provider.json +0 -46
- package/providers/_builtin/ide/windsurf/scripts/focus_editor.js +0 -30
- package/providers/_builtin/ide/windsurf/scripts/list_chats.js +0 -117
- package/providers/_builtin/ide/windsurf/scripts/list_models.js +0 -39
- package/providers/_builtin/ide/windsurf/scripts/list_modes.js +0 -39
- package/providers/_builtin/ide/windsurf/scripts/new_session.js +0 -69
- package/providers/_builtin/ide/windsurf/scripts/open_panel.js +0 -58
- package/providers/_builtin/ide/windsurf/scripts/read_chat.js +0 -297
- package/providers/_builtin/ide/windsurf/scripts/resolve_action.js +0 -68
- package/providers/_builtin/ide/windsurf/scripts/send_message.js +0 -87
- package/providers/_builtin/ide/windsurf/scripts/set_mode.js +0 -15
- package/providers/_builtin/ide/windsurf/scripts/set_model.js +0 -15
- package/providers/_builtin/ide/windsurf/scripts/switch_session.js +0 -58
- package/providers/_builtin/ide/windsurf/scripts.js +0 -57
- package/providers/_builtin/validate.js +0 -156
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Kiro โ open_panel
|
|
3
|
-
*
|
|
4
|
-
* Kiro AI ์ฑํ
ํจ๋ ์ด๊ธฐ.
|
|
5
|
-
* Secondary Side Bar (#workbench.parts.auxiliarybar)์ ์์น.
|
|
6
|
-
* "Toggle Secondary Side Bar (โฅโB)" ๋๋ "Kiro" ๋ฒํผ์ผ๋ก ์ด๊ธฐ.
|
|
7
|
-
*
|
|
8
|
-
* ๋ฐํ: 'visible' | 'opened' | 'error: ...'
|
|
9
|
-
*/
|
|
10
|
-
(() => {
|
|
11
|
-
try {
|
|
12
|
-
// 1. ์ด๋ฏธ ์ด๋ ค ์๋์ง ํ์ธ
|
|
13
|
-
const sidebar = document.getElementById('workbench.parts.auxiliarybar');
|
|
14
|
-
if (sidebar && sidebar.offsetWidth > 0 && sidebar.offsetHeight > 0) {
|
|
15
|
-
return 'visible';
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// 2. Toggle ๋ฒํผ ํด๋ฆญ ์๋
|
|
19
|
-
const toggleBtns = Array.from(document.querySelectorAll('li.action-item a, button, [role="button"]'));
|
|
20
|
-
for (const btn of toggleBtns) {
|
|
21
|
-
const label = (btn.getAttribute('aria-label') || '').toLowerCase();
|
|
22
|
-
if (label.includes('toggle secondary') || label.includes('toggle auxiliary') ||
|
|
23
|
-
label === 'kiro' || label.includes('kiro')) {
|
|
24
|
-
if (btn.offsetWidth > 0 || btn.offsetHeight > 0) {
|
|
25
|
-
btn.click();
|
|
26
|
-
return 'opened (toggle)';
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// 3. Cmd+Shift+I ๋จ์ถํค ํด๋ฐฑ (Kiro ๊ธฐ๋ณธ ๋จ์ถํค)
|
|
32
|
-
document.dispatchEvent(new KeyboardEvent('keydown', {
|
|
33
|
-
key: 'b', code: 'KeyB', keyCode: 66,
|
|
34
|
-
metaKey: true, altKey: true, ctrlKey: false,
|
|
35
|
-
bubbles: true, cancelable: true,
|
|
36
|
-
}));
|
|
37
|
-
document.dispatchEvent(new KeyboardEvent('keyup', {
|
|
38
|
-
key: 'b', code: 'KeyB', keyCode: 66,
|
|
39
|
-
metaKey: true, altKey: true, ctrlKey: false,
|
|
40
|
-
bubbles: true, cancelable: true,
|
|
41
|
-
}));
|
|
42
|
-
|
|
43
|
-
return 'opened (โฅโB)';
|
|
44
|
-
} catch (e) {
|
|
45
|
-
return 'error: ' + e.message;
|
|
46
|
-
}
|
|
47
|
-
})()
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Kiro โ resolve_action
|
|
3
|
-
*
|
|
4
|
-
* ์น์ธ/๊ฑฐ๋ถ ๋ฒํผ ์ฐพ๊ธฐ + ์ขํ ๋ฐํ.
|
|
5
|
-
* Kiro์ approval ๋ค์ด์ผ๋ก๊ทธ๋ ๋ฉ์ธ DOM์ ํ์๋จ.
|
|
6
|
-
*
|
|
7
|
-
* ํ๋ผ๋ฏธํฐ: ${ BUTTON_TEXT }
|
|
8
|
-
*/
|
|
9
|
-
(() => {
|
|
10
|
-
const want = ${ BUTTON_TEXT };
|
|
11
|
-
const wantNorm = (want || '').replace(/\s+/g, ' ').trim().toLowerCase();
|
|
12
|
-
|
|
13
|
-
function norm(t) { return (t || '').replace(/\s+/g, ' ').trim().toLowerCase(); }
|
|
14
|
-
|
|
15
|
-
function matches(el) {
|
|
16
|
-
const t = norm(el.textContent);
|
|
17
|
-
if (!t || t.length > 80) return false;
|
|
18
|
-
if (t === wantNorm) return true;
|
|
19
|
-
if (t.indexOf(wantNorm) === 0) return true;
|
|
20
|
-
if (wantNorm.indexOf(t) >= 0 && t.length > 2) return true;
|
|
21
|
-
if (/^(run|approve|allow|accept|yes)\b/.test(wantNorm)) {
|
|
22
|
-
if (/^(run|allow|accept|approve)\b/.test(t)) return true;
|
|
23
|
-
}
|
|
24
|
-
if (/^(reject|deny|no|abort)\b/.test(wantNorm)) {
|
|
25
|
-
if (/^(reject|deny)\b/.test(t)) return true;
|
|
26
|
-
}
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const sel = 'button, [role="button"], .monaco-button';
|
|
31
|
-
const allBtns = [...document.querySelectorAll(sel)].filter(b => {
|
|
32
|
-
if (!b.offsetWidth || !b.getBoundingClientRect().height) return false;
|
|
33
|
-
const rect = b.getBoundingClientRect();
|
|
34
|
-
return rect.y > 0 && rect.y < window.innerHeight;
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
let found = null;
|
|
38
|
-
for (let i = allBtns.length - 1; i >= 0; i--) {
|
|
39
|
-
if (matches(allBtns[i])) { found = allBtns[i]; break; }
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (found) {
|
|
43
|
-
const rect = found.getBoundingClientRect();
|
|
44
|
-
return JSON.stringify({
|
|
45
|
-
found: true,
|
|
46
|
-
text: found.textContent?.trim()?.substring(0, 40),
|
|
47
|
-
x: Math.round(rect.x + rect.width / 2),
|
|
48
|
-
y: Math.round(rect.y + rect.height / 2),
|
|
49
|
-
w: Math.round(rect.width),
|
|
50
|
-
h: Math.round(rect.height)
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
return JSON.stringify({ found: false, want: wantNorm });
|
|
54
|
-
})()
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Kiro โ send_message
|
|
3
|
-
*
|
|
4
|
-
* Kiro์ ์ฑํ
์
๋ ฅ์ webview iframe ์์ ์์ด ๋ฉ์ธ DOM์์ ์ง์ ์ ๊ทผ ๋ถ๊ฐ.
|
|
5
|
-
* auxbar ํ๋จ์ ์
๋ ฅ ํ๋ ์ขํ๋ฅผ ๊ณ์ฐํ์ฌ clickCoords๋ก ๋ฐํ.
|
|
6
|
-
* ๋ฐ๋ชฌ์ด CDP Input API๋ก ํด๋น ์ขํ์ ํด๋ฆญ+ํ์ดํ+Enter๋ฅผ ์ํ.
|
|
7
|
-
*
|
|
8
|
-
* ํ๋ผ๋ฏธํฐ: ${ MESSAGE }
|
|
9
|
-
*/
|
|
10
|
-
(() => {
|
|
11
|
-
try {
|
|
12
|
-
const auxbar = document.getElementById('workbench.parts.auxiliarybar');
|
|
13
|
-
if (!auxbar || auxbar.offsetWidth === 0) {
|
|
14
|
-
return JSON.stringify({ sent: false, error: 'auxbar not found' });
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const rect = auxbar.getBoundingClientRect();
|
|
18
|
-
const x = Math.round(rect.x + rect.width / 2);
|
|
19
|
-
const y = Math.round(rect.y + rect.height - 80);
|
|
20
|
-
|
|
21
|
-
return JSON.stringify({
|
|
22
|
-
sent: false,
|
|
23
|
-
needsTypeAndSend: true,
|
|
24
|
-
clickCoords: { x, y },
|
|
25
|
-
});
|
|
26
|
-
} catch (e) {
|
|
27
|
-
return JSON.stringify({ sent: false, error: e.message });
|
|
28
|
-
}
|
|
29
|
-
})()
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generic fallback โ list_models
|
|
3
|
-
*/
|
|
4
|
-
(() => {
|
|
5
|
-
try {
|
|
6
|
-
const models = [];
|
|
7
|
-
let current = '';
|
|
8
|
-
|
|
9
|
-
// Try generic Model string from select/button
|
|
10
|
-
const sel = document.querySelectorAll('select, [class*="model"], [id*="model"]');
|
|
11
|
-
for (const el of sel) {
|
|
12
|
-
const txt = (el.textContent || '').trim();
|
|
13
|
-
if (txt && /claude|gpt|gemini|sonnet|opus/i.test(txt)) {
|
|
14
|
-
if (txt.length < 50) {
|
|
15
|
-
models.push(txt);
|
|
16
|
-
if (!current) current = txt;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
if (models.length === 0) {
|
|
22
|
-
const btns = document.querySelectorAll('button');
|
|
23
|
-
for (const b of btns) {
|
|
24
|
-
const txt = (b.textContent || '').trim();
|
|
25
|
-
if (txt && /claude|gpt|gemini|sonnet/i.test(txt) && txt.length < 30) {
|
|
26
|
-
models.push(txt);
|
|
27
|
-
current = txt;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return JSON.stringify({
|
|
33
|
-
models: [...new Set(models)],
|
|
34
|
-
current: current || 'Default'
|
|
35
|
-
});
|
|
36
|
-
} catch (e) {
|
|
37
|
-
return JSON.stringify({ models: [], current: '', error: e.message });
|
|
38
|
-
}
|
|
39
|
-
})()
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generic fallback โ list_models
|
|
3
|
-
*/
|
|
4
|
-
(() => {
|
|
5
|
-
try {
|
|
6
|
-
const models = [];
|
|
7
|
-
let current = '';
|
|
8
|
-
|
|
9
|
-
// Try generic Model string from select/button
|
|
10
|
-
const sel = document.querySelectorAll('select, [class*="model"], [id*="model"]');
|
|
11
|
-
for (const el of sel) {
|
|
12
|
-
const txt = (el.textContent || '').trim();
|
|
13
|
-
if (txt && /claude|gpt|gemini|sonnet|opus/i.test(txt)) {
|
|
14
|
-
if (txt.length < 50) {
|
|
15
|
-
models.push(txt);
|
|
16
|
-
if (!current) current = txt;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
if (models.length === 0) {
|
|
22
|
-
const btns = document.querySelectorAll('button');
|
|
23
|
-
for (const b of btns) {
|
|
24
|
-
const txt = (b.textContent || '').trim();
|
|
25
|
-
if (txt && /claude|gpt|gemini|sonnet/i.test(txt) && txt.length < 30) {
|
|
26
|
-
models.push(txt);
|
|
27
|
-
current = txt;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return JSON.stringify({
|
|
33
|
-
models: [...new Set(models)],
|
|
34
|
-
current: current || 'Default'
|
|
35
|
-
});
|
|
36
|
-
} catch (e) {
|
|
37
|
-
return JSON.stringify({ models: [], current: '', error: e.message });
|
|
38
|
-
}
|
|
39
|
-
})()
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Kiro โ webview_list_sessions (webview iframe ๋ด๋ถ์์ ์คํ)
|
|
3
|
-
*
|
|
4
|
-
* Kiro์ ์ธ์
ํญ ๋ชฉ๋ก์ ๋ฐํ.
|
|
5
|
-
* DOM: .kiro-tabs-item
|
|
6
|
-
*/
|
|
7
|
-
(() => {
|
|
8
|
-
try {
|
|
9
|
-
const tabs = document.querySelectorAll('.kiro-tabs-item');
|
|
10
|
-
const sessions = Array.from(tabs).map((tab, i) => {
|
|
11
|
-
const label = tab.querySelector('.kiro-tabs-item-label');
|
|
12
|
-
const title = (label?.textContent || tab.textContent || '').trim();
|
|
13
|
-
const active = tab.classList.contains('active') ||
|
|
14
|
-
tab.getAttribute('aria-selected') === 'true';
|
|
15
|
-
return { id: String(i), title, active };
|
|
16
|
-
});
|
|
17
|
-
return JSON.stringify({ sessions });
|
|
18
|
-
} catch (e) {
|
|
19
|
-
return JSON.stringify({ sessions: [], error: e.message });
|
|
20
|
-
}
|
|
21
|
-
})()
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Kiro โ webview_new_session (webview iframe ๋ด๋ถ์์ ์คํ)
|
|
3
|
-
*
|
|
4
|
-
* "New Session" ๋ฒํผ/ํญ ํด๋ฆญ.
|
|
5
|
-
* Kiro๋ ํญ ๋ฐ์ + ๋ฒํผ ๋๋ "New Session" ์ก์
์ด ์์.
|
|
6
|
-
*/
|
|
7
|
-
(() => {
|
|
8
|
-
try {
|
|
9
|
-
// kiro-icon-button (+ ๋ฒํผ) ์ฐพ๊ธฐ
|
|
10
|
-
const addBtns = document.querySelectorAll('.kiro-icon-button, button, [role="button"]');
|
|
11
|
-
for (const btn of addBtns) {
|
|
12
|
-
const ariaLabel = (btn.getAttribute('aria-label') || '').toLowerCase();
|
|
13
|
-
const title = (btn.getAttribute('title') || '').toLowerCase();
|
|
14
|
-
if (ariaLabel.includes('new') || title.includes('new') ||
|
|
15
|
-
ariaLabel.includes('add') || title.includes('add')) {
|
|
16
|
-
btn.click();
|
|
17
|
-
return JSON.stringify({ created: true, method: 'button' });
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// Checkpoint > New Session ์์ญ ์ฐพ๊ธฐ
|
|
22
|
-
const allText = document.querySelectorAll('*');
|
|
23
|
-
for (const el of allText) {
|
|
24
|
-
if (el.children.length === 0 && (el.textContent || '').trim() === 'New Session') {
|
|
25
|
-
el.click();
|
|
26
|
-
return JSON.stringify({ created: true, method: 'text-click' });
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return JSON.stringify({ created: false, error: 'New Session button not found' });
|
|
31
|
-
} catch (e) {
|
|
32
|
-
return JSON.stringify({ created: false, error: e.message });
|
|
33
|
-
}
|
|
34
|
-
})()
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Kiro โ webview_read_chat (webview iframe ๋ด๋ถ์์ ์คํ)
|
|
3
|
-
*
|
|
4
|
-
* Kiro์ ์ฑํ
UI๋ webview iframe ์์ ์์นํ๋ฉฐ,
|
|
5
|
-
* ๋ฐ๋ชฌ์ evaluateInWebviewFrame์ ํตํด ์คํ๋จ.
|
|
6
|
-
*
|
|
7
|
-
* DOM ๊ตฌ์กฐ:
|
|
8
|
-
* .kiro-chat-timeline
|
|
9
|
-
* .kiro-chat-message (์ ์ /์ด์์คํดํธ ๋ฉ์์ง)
|
|
10
|
-
* .kiro-chat-message-meta โ .kiro-chat-message-role (๋ฐ์ ์)
|
|
11
|
-
* .kiro-chat-message-body โ .kiro-chat-message-markdown (๋ด์ฉ)
|
|
12
|
-
*
|
|
13
|
-
* ๋ฐํ: ReadChatResult { id, status, messages, inputContent? }
|
|
14
|
-
*/
|
|
15
|
-
(() => {
|
|
16
|
-
try {
|
|
17
|
-
const messages = [];
|
|
18
|
-
const msgElements = document.querySelectorAll('.kiro-chat-message');
|
|
19
|
-
|
|
20
|
-
msgElements.forEach((msg, idx) => {
|
|
21
|
-
const roleMeta = msg.querySelector('.kiro-chat-message-role');
|
|
22
|
-
const roleText = (roleMeta?.textContent || '').trim();
|
|
23
|
-
const isKiro = roleText.toLowerCase() === 'kiro';
|
|
24
|
-
const role = isKiro ? 'assistant' : 'user';
|
|
25
|
-
|
|
26
|
-
const body = msg.querySelector('.kiro-chat-message-body');
|
|
27
|
-
let content = '';
|
|
28
|
-
if (body) {
|
|
29
|
-
const markdown = body.querySelector('.kiro-chat-message-markdown');
|
|
30
|
-
content = (markdown || body).textContent?.trim() || '';
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (content) {
|
|
34
|
-
messages.push({ role, content, index: idx });
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
// ์ํ ๊ฐ์ง
|
|
39
|
-
let status = 'idle';
|
|
40
|
-
|
|
41
|
-
// "Working" / "Cancel" ๋ฒํผ โ generating
|
|
42
|
-
const workingBar = document.querySelector('.kiro-snackbar');
|
|
43
|
-
if (workingBar && workingBar.offsetWidth > 0) {
|
|
44
|
-
const barText = (workingBar.textContent || '').toLowerCase();
|
|
45
|
-
if (barText.includes('working') || barText.includes('cancel')) {
|
|
46
|
-
status = 'generating';
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// ์
๋ ฅ ํ๋ ๋ด์ฉ
|
|
51
|
-
const input = document.querySelector('.tiptap.ProseMirror, [contenteditable="true"]');
|
|
52
|
-
const inputContent = input ? input.textContent?.trim() : '';
|
|
53
|
-
|
|
54
|
-
// ์ธ์
ํญ
|
|
55
|
-
const tab = document.querySelector('.kiro-tabs-item.active, .kiro-tabs-item[aria-selected="true"]');
|
|
56
|
-
const title = tab?.textContent?.trim() || '';
|
|
57
|
-
|
|
58
|
-
return JSON.stringify({
|
|
59
|
-
id: title || 'kiro-default',
|
|
60
|
-
status,
|
|
61
|
-
messages,
|
|
62
|
-
title: title || undefined,
|
|
63
|
-
inputContent: inputContent || undefined,
|
|
64
|
-
});
|
|
65
|
-
} catch (e) {
|
|
66
|
-
return JSON.stringify({ id: '', status: 'error', messages: [], error: e.message });
|
|
67
|
-
}
|
|
68
|
-
})()
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Kiro โ webview_send_message (webview iframe ๋ด๋ถ์์ ์คํ)
|
|
3
|
-
*
|
|
4
|
-
* Kiro์ ์ฑํ
์
๋ ฅ์ webview iframe ์์ ProseMirror/tiptap ์๋ํฐ.
|
|
5
|
-
* execCommand('insertText') + Enter ํค ์ด๋ฒคํธ๋ก ๋ฉ์์ง ์ ์ก.
|
|
6
|
-
*
|
|
7
|
-
* ํ๋ผ๋ฏธํฐ: ${ MESSAGE }
|
|
8
|
-
*/
|
|
9
|
-
(async () => {
|
|
10
|
-
try {
|
|
11
|
-
const msg = ${ MESSAGE };
|
|
12
|
-
|
|
13
|
-
// โโโ 1. ์
๋ ฅ ํ๋ ์ฐพ๊ธฐ โโโ
|
|
14
|
-
const editor =
|
|
15
|
-
document.querySelector('.tiptap.ProseMirror') ||
|
|
16
|
-
document.querySelector('[contenteditable="true"]') ||
|
|
17
|
-
document.querySelector('textarea');
|
|
18
|
-
|
|
19
|
-
if (!editor) return JSON.stringify({ sent: false, error: 'no input found in webview' });
|
|
20
|
-
|
|
21
|
-
const isTextarea = editor.tagName === 'TEXTAREA';
|
|
22
|
-
|
|
23
|
-
if (isTextarea) {
|
|
24
|
-
editor.focus();
|
|
25
|
-
const nativeSetter = Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, 'value')?.set;
|
|
26
|
-
if (nativeSetter) nativeSetter.call(editor, msg);
|
|
27
|
-
else editor.value = msg;
|
|
28
|
-
editor.dispatchEvent(new Event('input', { bubbles: true }));
|
|
29
|
-
await new Promise(r => setTimeout(r, 300));
|
|
30
|
-
|
|
31
|
-
const enterOpts = { key: 'Enter', code: 'Enter', keyCode: 13, which: 13, bubbles: true, cancelable: true, composed: true };
|
|
32
|
-
editor.dispatchEvent(new KeyboardEvent('keydown', enterOpts));
|
|
33
|
-
editor.dispatchEvent(new KeyboardEvent('keypress', enterOpts));
|
|
34
|
-
editor.dispatchEvent(new KeyboardEvent('keyup', enterOpts));
|
|
35
|
-
return JSON.stringify({ sent: true });
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// โโโ 2. contenteditable (ProseMirror / tiptap) โโโ
|
|
39
|
-
editor.focus();
|
|
40
|
-
await new Promise(r => setTimeout(r, 100));
|
|
41
|
-
|
|
42
|
-
// ์ ์ฒด ์ ํ + ์ญ์ + ์ฝ์
|
|
43
|
-
const sel = window.getSelection();
|
|
44
|
-
const range = document.createRange();
|
|
45
|
-
range.selectNodeContents(editor);
|
|
46
|
-
sel.removeAllRanges();
|
|
47
|
-
sel.addRange(range);
|
|
48
|
-
await new Promise(r => setTimeout(r, 50));
|
|
49
|
-
|
|
50
|
-
document.execCommand('delete', false, null);
|
|
51
|
-
await new Promise(r => setTimeout(r, 50));
|
|
52
|
-
document.execCommand('insertText', false, msg);
|
|
53
|
-
|
|
54
|
-
editor.dispatchEvent(new Event('input', { bubbles: true }));
|
|
55
|
-
await new Promise(r => setTimeout(r, 400));
|
|
56
|
-
|
|
57
|
-
// โโโ 3. Enter ํค ์ ์ก โโโ
|
|
58
|
-
const enterOpts = {
|
|
59
|
-
key: 'Enter', code: 'Enter',
|
|
60
|
-
keyCode: 13, which: 13,
|
|
61
|
-
bubbles: true, cancelable: true, composed: true,
|
|
62
|
-
};
|
|
63
|
-
editor.dispatchEvent(new KeyboardEvent('keydown', enterOpts));
|
|
64
|
-
await new Promise(r => setTimeout(r, 50));
|
|
65
|
-
editor.dispatchEvent(new KeyboardEvent('keypress', enterOpts));
|
|
66
|
-
editor.dispatchEvent(new KeyboardEvent('keyup', enterOpts));
|
|
67
|
-
|
|
68
|
-
return JSON.stringify({ sent: true });
|
|
69
|
-
} catch (e) {
|
|
70
|
-
return JSON.stringify({ sent: false, error: e.message });
|
|
71
|
-
}
|
|
72
|
-
})()
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generic fallback โ set_model
|
|
3
|
-
* ${ MODEL }
|
|
4
|
-
*/
|
|
5
|
-
(() => {
|
|
6
|
-
try {
|
|
7
|
-
const want = ${ MODEL } || '';
|
|
8
|
-
const norm = (t) => t.toLowerCase().trim();
|
|
9
|
-
|
|
10
|
-
// Very basic click attempt
|
|
11
|
-
return JSON.stringify({ success: false, error: 'Model selection requires UI interaction not supported by generic script' });
|
|
12
|
-
} catch (e) {
|
|
13
|
-
return JSON.stringify({ success: false, error: e.message });
|
|
14
|
-
}
|
|
15
|
-
})()
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generic fallback โ set_model
|
|
3
|
-
* ${ MODEL }
|
|
4
|
-
*/
|
|
5
|
-
(() => {
|
|
6
|
-
try {
|
|
7
|
-
const want = ${ MODEL } || '';
|
|
8
|
-
const norm = (t) => t.toLowerCase().trim();
|
|
9
|
-
|
|
10
|
-
// Very basic click attempt
|
|
11
|
-
return JSON.stringify({ success: false, error: 'Model selection requires UI interaction not supported by generic script' });
|
|
12
|
-
} catch (e) {
|
|
13
|
-
return JSON.stringify({ success: false, error: e.message });
|
|
14
|
-
}
|
|
15
|
-
})()
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Kiro โ webview_switch_session (webview iframe ๋ด๋ถ์์ ์คํ)
|
|
3
|
-
*
|
|
4
|
-
* ์ธ์
ํญ ํด๋ฆญ์ผ๋ก ์ ํ.
|
|
5
|
-
* ํ๋ผ๋ฏธํฐ: ${ SESSION_ID } (ํญ ์ธ๋ฑ์ค)
|
|
6
|
-
*/
|
|
7
|
-
(() => {
|
|
8
|
-
try {
|
|
9
|
-
const targetId = ${ SESSION_ID };
|
|
10
|
-
const tabs = document.querySelectorAll('.kiro-tabs-item');
|
|
11
|
-
const idx = parseInt(targetId, 10);
|
|
12
|
-
|
|
13
|
-
if (isNaN(idx) || idx < 0 || idx >= tabs.length) {
|
|
14
|
-
return JSON.stringify({ switched: false, error: `Invalid session index: ${targetId}, total: ${tabs.length}` });
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
tabs[idx].click();
|
|
18
|
-
const label = tabs[idx].querySelector('.kiro-tabs-item-label');
|
|
19
|
-
return JSON.stringify({
|
|
20
|
-
switched: true,
|
|
21
|
-
title: (label?.textContent || tabs[idx].textContent || '').trim(),
|
|
22
|
-
});
|
|
23
|
-
} catch (e) {
|
|
24
|
-
return JSON.stringify({ switched: false, error: e.message });
|
|
25
|
-
}
|
|
26
|
-
})()
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CDP Scripts for Kiro
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
const fs = require('fs');
|
|
6
|
-
const path = require('path');
|
|
7
|
-
const SCRIPTS_DIR = path.join(__dirname, 'scripts');
|
|
8
|
-
function loadScript(name) {
|
|
9
|
-
try { return fs.readFileSync(path.join(SCRIPTS_DIR, name), 'utf8'); }
|
|
10
|
-
catch { return null; }
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
module.exports.webviewReadChat = function webviewReadChat() { return loadScript('webview_read_chat.js'); };
|
|
15
|
-
|
|
16
|
-
module.exports.webviewSendMessage = function webviewSendMessage(text) {
|
|
17
|
-
const s = loadScript('webview_send_message.js');
|
|
18
|
-
return s ? s.replace(/\$\{\s*MESSAGE\s*\}/g, JSON.stringify(text)) : null;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
module.exports.sendMessage = function sendMessage(text) {
|
|
22
|
-
const s = loadScript('send_message.js');
|
|
23
|
-
return s ? s.replace(/\$\{\s*MESSAGE\s*\}/g, JSON.stringify(text)) : null;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
module.exports.resolveAction = function resolveAction(params) {
|
|
27
|
-
const action = typeof params === 'string' ? params : params?.action || 'approve';
|
|
28
|
-
const buttonText = params?.button || params?.buttonText
|
|
29
|
-
|| (action === 'approve' ? 'Accept' : action === 'reject' ? 'Reject' : action);
|
|
30
|
-
const s = loadScript('resolve_action.js');
|
|
31
|
-
return s ? s.replace(/\$\{\s*BUTTON_TEXT\s*\}/g, JSON.stringify(buttonText)) : null;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
module.exports.openPanel = function openPanel() { return loadScript('open_panel.js'); };
|
|
35
|
-
|
|
36
|
-
module.exports.focusEditor = function focusEditor() { return loadScript('focus_editor.js'); };
|
|
37
|
-
|
|
38
|
-
module.exports.webviewListSessions = function webviewListSessions() { return loadScript('webview_list_sessions.js'); };
|
|
39
|
-
|
|
40
|
-
module.exports.webviewNewSession = function webviewNewSession() { return loadScript('webview_new_session.js'); };
|
|
41
|
-
|
|
42
|
-
module.exports.webviewSwitchSession = function webviewSwitchSession(sessionId) {
|
|
43
|
-
const s = loadScript('webview_switch_session.js');
|
|
44
|
-
return s ? s.replace(/\$\{\s*SESSION_ID\s*\}/g, JSON.stringify(sessionId)) : null;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
module.exports.webviewListModels = function webviewListModels() { return loadScript('webview_list_models.js'); };
|
|
48
|
-
|
|
49
|
-
module.exports.webviewSetModel = function webviewSetModel(params) {
|
|
50
|
-
const model = typeof params === 'string' ? params : params?.model;
|
|
51
|
-
const s = loadScript('webview_set_model.js');
|
|
52
|
-
return s ? s.replace(/\$\{\s*MODEL\s*\}/g, JSON.stringify(model)) : null;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
module.exports.webviewListModes = function webviewListModes() { return loadScript('webview_list_modes.js'); };
|
|
56
|
-
|
|
57
|
-
module.exports.webviewSetMode = function webviewSetMode(params) {
|
|
58
|
-
const mode = typeof params === 'string' ? params : params?.mode;
|
|
59
|
-
const s = loadScript('webview_set_mode.js');
|
|
60
|
-
return s ? s.replace(/\$\{\s*MODE\s*\}/g, JSON.stringify(mode)) : null;
|
|
61
|
-
};
|
|
62
|
-
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "pearai",
|
|
3
|
-
"name": "PearAI",
|
|
4
|
-
"category": "ide",
|
|
5
|
-
"displayName": "PearAI",
|
|
6
|
-
"icon": "๐",
|
|
7
|
-
"cli": "pearai",
|
|
8
|
-
"cdpPorts": [
|
|
9
|
-
9355,
|
|
10
|
-
9356
|
|
11
|
-
],
|
|
12
|
-
"processNames": {
|
|
13
|
-
"darwin": "PearAI",
|
|
14
|
-
"win32": [
|
|
15
|
-
"PearAI.exe"
|
|
16
|
-
],
|
|
17
|
-
"linux": [
|
|
18
|
-
"pearai"
|
|
19
|
-
]
|
|
20
|
-
},
|
|
21
|
-
"paths": {
|
|
22
|
-
"darwin": [
|
|
23
|
-
"/Applications/PearAI.app"
|
|
24
|
-
],
|
|
25
|
-
"win32": [
|
|
26
|
-
"C:\\Users\\*\\AppData\\Local\\Programs\\pearai\\PearAI.exe"
|
|
27
|
-
],
|
|
28
|
-
"linux": [
|
|
29
|
-
"/opt/pearai",
|
|
30
|
-
"/usr/share/pearai"
|
|
31
|
-
]
|
|
32
|
-
},
|
|
33
|
-
"inputMethod": "cdp-type-and-send",
|
|
34
|
-
"inputSelector": "[contenteditable=\"true\"][role=\"textbox\"]",
|
|
35
|
-
"webviewMatchText": "chat-text-area",
|
|
36
|
-
"settings": {
|
|
37
|
-
"approvalAlert": {
|
|
38
|
-
"type": "boolean",
|
|
39
|
-
"default": true,
|
|
40
|
-
"public": true,
|
|
41
|
-
"label": "Approval Notifications",
|
|
42
|
-
"description": "Show notification when approval is needed"
|
|
43
|
-
},
|
|
44
|
-
"longGeneratingAlert": {
|
|
45
|
-
"type": "boolean",
|
|
46
|
-
"default": true,
|
|
47
|
-
"public": true,
|
|
48
|
-
"label": "Long Generation Alert",
|
|
49
|
-
"description": "Alert when generation takes too long"
|
|
50
|
-
},
|
|
51
|
-
"longGeneratingThresholdSec": {
|
|
52
|
-
"type": "number",
|
|
53
|
-
"default": 180,
|
|
54
|
-
"public": true,
|
|
55
|
-
"label": "Long Generation Threshold (sec)",
|
|
56
|
-
"min": 30,
|
|
57
|
-
"max": 600
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cursor v1 โ focus_editor
|
|
3
|
-
*
|
|
4
|
-
* CURSOR.md 4-5: ์
๋ ํฐ ์ฐ์ ์์
|
|
5
|
-
* [contenteditable="true"][role="textbox"]
|
|
6
|
-
* โ .chat-input textarea
|
|
7
|
-
* โ .composer-input
|
|
8
|
-
* โ textarea
|
|
9
|
-
*
|
|
10
|
-
* ์ต์ข
ํ์ธ: 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,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PearAI โ list_sessions (IDE ๋ฉ์ธ ํ๋ ์์์ ์คํ)
|
|
3
|
-
*
|
|
4
|
-
* ํ์คํ ๋ฆฌ ํจ๋ ํ ๊ธ ๋ฒํผ์ ํด๋ฆญํ์ฌ ํ์คํ ๋ฆฌ ๋ทฐ๋ฅผ ์คํํฉ๋๋ค.
|
|
5
|
-
* ํ์คํ ๋ฆฌ ๋ทฐ๊ฐ ์ด๋ฆฌ๋ฉด webviewListSessions๋ก ํญ๋ชฉ์ ์ฝ์ ์ ์์ต๋๋ค.
|
|
6
|
-
*/
|
|
7
|
-
(() => {
|
|
8
|
-
try {
|
|
9
|
-
// Panel title bar์์ ํ์คํ ๋ฆฌ ๊ด๋ จ ๋ฒํผ ์ฐพ๊ธฐ
|
|
10
|
-
const actionBtns = document.querySelectorAll('.action-item a.action-label, .action-item .action-label');
|
|
11
|
-
for (const btn of actionBtns) {
|
|
12
|
-
const title = (btn.getAttribute('title') || '').toLowerCase();
|
|
13
|
-
const ariaLabel = (btn.getAttribute('aria-label') || '').toLowerCase();
|
|
14
|
-
const cls = btn.className || '';
|
|
15
|
-
|
|
16
|
-
if (title.includes('history') || title.includes('ํ์คํ ๋ฆฌ') ||
|
|
17
|
-
ariaLabel.includes('history') || ariaLabel.includes('ํ์คํ ๋ฆฌ') ||
|
|
18
|
-
cls.includes('codicon-history')) {
|
|
19
|
-
btn.click();
|
|
20
|
-
return JSON.stringify({ toggled: true, method: 'panelAction', title: btn.getAttribute('title') });
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Broader search
|
|
25
|
-
const allBtns = document.querySelectorAll('a[title], button[title]');
|
|
26
|
-
for (const btn of allBtns) {
|
|
27
|
-
const title = (btn.getAttribute('title') || '').toLowerCase();
|
|
28
|
-
if (title.includes('history') || title.includes('task history')) {
|
|
29
|
-
btn.click();
|
|
30
|
-
return JSON.stringify({ toggled: true, method: 'titleBtn', title: btn.getAttribute('title') });
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return JSON.stringify({ toggled: false, error: 'History toggle button not found' });
|
|
35
|
-
} catch (e) {
|
|
36
|
-
return JSON.stringify({ toggled: false, error: e.message });
|
|
37
|
-
}
|
|
38
|
-
})()
|