adhdev 0.2.0 → 0.4.1

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 (145) hide show
  1. package/dist/cli-entrypoint.js +18710 -1198
  2. package/dist/cli-entrypoint.js.map +1 -1
  3. package/dist/index.js +18720 -1228
  4. package/dist/index.js.map +1 -1
  5. package/package.json +2 -2
  6. package/providers/_builtin/CONTRIBUTING.md +0 -141
  7. package/providers/_builtin/README.md +0 -51
  8. package/providers/_builtin/_helpers/index.js +0 -188
  9. package/providers/_builtin/acp/agentpool/provider.json +0 -47
  10. package/providers/_builtin/acp/amp/provider.json +0 -45
  11. package/providers/_builtin/acp/auggie/provider.json +0 -50
  12. package/providers/_builtin/acp/autodev/provider.json +0 -47
  13. package/providers/_builtin/acp/autohand/provider.json +0 -45
  14. package/providers/_builtin/acp/blackbox-ai/provider.json +0 -47
  15. package/providers/_builtin/acp/claude-agent/provider.json +0 -50
  16. package/providers/_builtin/acp/cline-acp/provider.json +0 -47
  17. package/providers/_builtin/acp/code-assistant/provider.json +0 -47
  18. package/providers/_builtin/acp/codebuddy/provider.json +0 -47
  19. package/providers/_builtin/acp/codex-cli/provider.json +0 -50
  20. package/providers/_builtin/acp/corust-agent/provider.json +0 -45
  21. package/providers/_builtin/acp/crow-cli/provider.json +0 -47
  22. package/providers/_builtin/acp/cursor-acp/provider.json +0 -47
  23. package/providers/_builtin/acp/deepagents/provider.json +0 -45
  24. package/providers/_builtin/acp/dimcode/provider.json +0 -47
  25. package/providers/_builtin/acp/docker-cagent/provider.json +0 -50
  26. package/providers/_builtin/acp/factory-droid/provider.json +0 -53
  27. package/providers/_builtin/acp/fast-agent/provider.json +0 -45
  28. package/providers/_builtin/acp/fount/provider.json +0 -47
  29. package/providers/_builtin/acp/gemini-cli/provider.json +0 -107
  30. package/providers/_builtin/acp/github-copilot/provider.json +0 -47
  31. package/providers/_builtin/acp/goose/provider.json +0 -50
  32. package/providers/_builtin/acp/junie/provider.json +0 -45
  33. package/providers/_builtin/acp/kilo/provider.json +0 -45
  34. package/providers/_builtin/acp/kimi-cli/provider.json +0 -50
  35. package/providers/_builtin/acp/kiro-cli/provider.json +0 -47
  36. package/providers/_builtin/acp/minion-code/provider.json +0 -45
  37. package/providers/_builtin/acp/mistral-vibe/provider.json +0 -50
  38. package/providers/_builtin/acp/nova/provider.json +0 -47
  39. package/providers/_builtin/acp/openclaw/provider.json +0 -47
  40. package/providers/_builtin/acp/opencode/provider.json +0 -45
  41. package/providers/_builtin/acp/openhands/provider.json +0 -47
  42. package/providers/_builtin/acp/pi-acp/provider.json +0 -45
  43. package/providers/_builtin/acp/qoder/provider.json +0 -47
  44. package/providers/_builtin/acp/qwen-code/provider.json +0 -53
  45. package/providers/_builtin/acp/stakpak/provider.json +0 -47
  46. package/providers/_builtin/acp/vtcode/provider.json +0 -47
  47. package/providers/_builtin/cli/claude-cli/provider.json +0 -78
  48. package/providers/_builtin/cli/codex-cli/provider.json +0 -60
  49. package/providers/_builtin/cli/gemini-cli/provider.json +0 -64
  50. package/providers/_builtin/extension/cline/provider.json +0 -11
  51. package/providers/_builtin/extension/cline/scripts/focus_editor.js +0 -48
  52. package/providers/_builtin/extension/cline/scripts/list_chats.js +0 -100
  53. package/providers/_builtin/extension/cline/scripts/list_models.js +0 -43
  54. package/providers/_builtin/extension/cline/scripts/list_modes.js +0 -35
  55. package/providers/_builtin/extension/cline/scripts/new_session.js +0 -85
  56. package/providers/_builtin/extension/cline/scripts/open_panel.js +0 -25
  57. package/providers/_builtin/extension/cline/scripts/read_chat.js +0 -257
  58. package/providers/_builtin/extension/cline/scripts/resolve_action.js +0 -83
  59. package/providers/_builtin/extension/cline/scripts/send_message.js +0 -95
  60. package/providers/_builtin/extension/cline/scripts/set_mode.js +0 -36
  61. package/providers/_builtin/extension/cline/scripts/set_model.js +0 -36
  62. package/providers/_builtin/extension/cline/scripts/switch_session.js +0 -206
  63. package/providers/_builtin/extension/cline/scripts.js +0 -73
  64. package/providers/_builtin/extension/roo-code/provider.json +0 -11
  65. package/providers/_builtin/extension/roo-code/scripts.js +0 -659
  66. package/providers/_builtin/ide/antigravity/provider.json +0 -32
  67. package/providers/_builtin/ide/antigravity/scripts/focus_editor.js +0 -20
  68. package/providers/_builtin/ide/antigravity/scripts/list_chats.js +0 -137
  69. package/providers/_builtin/ide/antigravity/scripts/list_models.js +0 -38
  70. package/providers/_builtin/ide/antigravity/scripts/list_modes.js +0 -48
  71. package/providers/_builtin/ide/antigravity/scripts/new_session.js +0 -75
  72. package/providers/_builtin/ide/antigravity/scripts/read_chat.js +0 -262
  73. package/providers/_builtin/ide/antigravity/scripts/resolve_action.js +0 -68
  74. package/providers/_builtin/ide/antigravity/scripts/send_message.js +0 -56
  75. package/providers/_builtin/ide/antigravity/scripts/set_mode.js +0 -34
  76. package/providers/_builtin/ide/antigravity/scripts/set_model.js +0 -47
  77. package/providers/_builtin/ide/antigravity/scripts/switch_session.js +0 -114
  78. package/providers/_builtin/ide/antigravity/scripts.js +0 -73
  79. package/providers/_builtin/ide/cursor/provider.json +0 -35
  80. package/providers/_builtin/ide/cursor/scripts.js +0 -452
  81. package/providers/_builtin/ide/kiro/provider.json +0 -36
  82. package/providers/_builtin/ide/kiro/scripts/focus_editor.js +0 -20
  83. package/providers/_builtin/ide/kiro/scripts/open_panel.js +0 -47
  84. package/providers/_builtin/ide/kiro/scripts/resolve_action.js +0 -54
  85. package/providers/_builtin/ide/kiro/scripts/send_message.js +0 -29
  86. package/providers/_builtin/ide/kiro/scripts/webview_list_models.js +0 -39
  87. package/providers/_builtin/ide/kiro/scripts/webview_list_modes.js +0 -39
  88. package/providers/_builtin/ide/kiro/scripts/webview_list_sessions.js +0 -21
  89. package/providers/_builtin/ide/kiro/scripts/webview_new_session.js +0 -34
  90. package/providers/_builtin/ide/kiro/scripts/webview_read_chat.js +0 -68
  91. package/providers/_builtin/ide/kiro/scripts/webview_send_message.js +0 -72
  92. package/providers/_builtin/ide/kiro/scripts/webview_set_mode.js +0 -15
  93. package/providers/_builtin/ide/kiro/scripts/webview_set_model.js +0 -15
  94. package/providers/_builtin/ide/kiro/scripts/webview_switch_session.js +0 -26
  95. package/providers/_builtin/ide/kiro/scripts.js +0 -62
  96. package/providers/_builtin/ide/pearai/provider.json +0 -36
  97. package/providers/_builtin/ide/pearai/scripts/focus_editor.js +0 -20
  98. package/providers/_builtin/ide/pearai/scripts/list_sessions.js +0 -38
  99. package/providers/_builtin/ide/pearai/scripts/new_session.js +0 -55
  100. package/providers/_builtin/ide/pearai/scripts/open_panel.js +0 -46
  101. package/providers/_builtin/ide/pearai/scripts/resolve_action.js +0 -54
  102. package/providers/_builtin/ide/pearai/scripts/send_message.js +0 -29
  103. package/providers/_builtin/ide/pearai/scripts/webview_list_models.js +0 -43
  104. package/providers/_builtin/ide/pearai/scripts/webview_list_modes.js +0 -35
  105. package/providers/_builtin/ide/pearai/scripts/webview_list_sessions.js +0 -62
  106. package/providers/_builtin/ide/pearai/scripts/webview_new_session.js +0 -49
  107. package/providers/_builtin/ide/pearai/scripts/webview_read_chat.js +0 -92
  108. package/providers/_builtin/ide/pearai/scripts/webview_resolve_action.js +0 -59
  109. package/providers/_builtin/ide/pearai/scripts/webview_send_message.js +0 -72
  110. package/providers/_builtin/ide/pearai/scripts/webview_set_mode.js +0 -36
  111. package/providers/_builtin/ide/pearai/scripts/webview_set_model.js +0 -36
  112. package/providers/_builtin/ide/pearai/scripts/webview_switch_session.js +0 -34
  113. package/providers/_builtin/ide/pearai/scripts.js +0 -74
  114. package/providers/_builtin/ide/trae/provider.json +0 -35
  115. package/providers/_builtin/ide/trae/scripts/focus_editor.js +0 -20
  116. package/providers/_builtin/ide/trae/scripts/list_chats.js +0 -24
  117. package/providers/_builtin/ide/trae/scripts/list_models.js +0 -39
  118. package/providers/_builtin/ide/trae/scripts/list_modes.js +0 -39
  119. package/providers/_builtin/ide/trae/scripts/new_session.js +0 -30
  120. package/providers/_builtin/ide/trae/scripts/open_panel.js +0 -44
  121. package/providers/_builtin/ide/trae/scripts/read_chat.js +0 -113
  122. package/providers/_builtin/ide/trae/scripts/resolve_action.js +0 -54
  123. package/providers/_builtin/ide/trae/scripts/send_message.js +0 -69
  124. package/providers/_builtin/ide/trae/scripts/set_mode.js +0 -15
  125. package/providers/_builtin/ide/trae/scripts/set_model.js +0 -15
  126. package/providers/_builtin/ide/trae/scripts/switch_session.js +0 -23
  127. package/providers/_builtin/ide/trae/scripts.js +0 -57
  128. package/providers/_builtin/ide/vscode/provider.json +0 -33
  129. package/providers/_builtin/ide/vscode-insiders/provider.json +0 -31
  130. package/providers/_builtin/ide/vscodium/provider.json +0 -32
  131. package/providers/_builtin/ide/windsurf/provider.json +0 -22
  132. package/providers/_builtin/ide/windsurf/scripts/focus_editor.js +0 -30
  133. package/providers/_builtin/ide/windsurf/scripts/list_chats.js +0 -117
  134. package/providers/_builtin/ide/windsurf/scripts/list_models.js +0 -39
  135. package/providers/_builtin/ide/windsurf/scripts/list_modes.js +0 -39
  136. package/providers/_builtin/ide/windsurf/scripts/new_session.js +0 -69
  137. package/providers/_builtin/ide/windsurf/scripts/open_panel.js +0 -58
  138. package/providers/_builtin/ide/windsurf/scripts/read_chat.js +0 -297
  139. package/providers/_builtin/ide/windsurf/scripts/resolve_action.js +0 -68
  140. package/providers/_builtin/ide/windsurf/scripts/send_message.js +0 -87
  141. package/providers/_builtin/ide/windsurf/scripts/set_mode.js +0 -15
  142. package/providers/_builtin/ide/windsurf/scripts/set_model.js +0 -15
  143. package/providers/_builtin/ide/windsurf/scripts/switch_session.js +0 -58
  144. package/providers/_builtin/ide/windsurf/scripts.js +0 -57
  145. package/providers/_builtin/validate.js +0 -156
@@ -1,45 +0,0 @@
1
- {
2
- "type": "pi-acp",
3
- "name": "pi ACP",
4
- "category": "acp",
5
- "displayName": "pi ACP",
6
- "icon": "🥧",
7
- "install": "npm install -g pi-acp",
8
- "spawn": {
9
- "command": "pi-acp",
10
- "args": [],
11
- "shell": false
12
- },
13
- "auth": [
14
- {
15
- "type": "agent",
16
- "id": "pi",
17
- "name": "pi Auth",
18
- "description": "Configure provider through pi setup"
19
- }
20
- ],
21
- "settings": {
22
- "approvalAlert": {
23
- "type": "boolean",
24
- "default": true,
25
- "public": true,
26
- "label": "Approval Alerts",
27
- "description": "Show notification when agent requires approval"
28
- },
29
- "longGeneratingAlert": {
30
- "type": "boolean",
31
- "default": true,
32
- "public": true,
33
- "label": "Long Generation Alert",
34
- "description": "Alert when generation takes too long"
35
- },
36
- "longGeneratingThresholdSec": {
37
- "type": "number",
38
- "default": 180,
39
- "public": true,
40
- "label": "Long Generation Threshold (sec)",
41
- "min": 30,
42
- "max": 600
43
- }
44
- }
45
- }
@@ -1,47 +0,0 @@
1
- {
2
- "type": "qoder-acp",
3
- "name": "Qoder CLI (ACP)",
4
- "category": "acp",
5
- "displayName": "Qoder CLI",
6
- "icon": "🔷",
7
- "install": "npm install -g @qoder-ai/qodercli",
8
- "spawn": {
9
- "command": "qodercli",
10
- "args": [
11
- "--acp"
12
- ],
13
- "shell": false
14
- },
15
- "auth": [
16
- {
17
- "type": "agent",
18
- "id": "qoder",
19
- "name": "Qoder Auth",
20
- "description": "Authenticate through Qoder setup"
21
- }
22
- ],
23
- "settings": {
24
- "approvalAlert": {
25
- "type": "boolean",
26
- "default": true,
27
- "public": true,
28
- "label": "Approval Alerts",
29
- "description": "Show notification when agent requires approval"
30
- },
31
- "longGeneratingAlert": {
32
- "type": "boolean",
33
- "default": true,
34
- "public": true,
35
- "label": "Long Generation Alert",
36
- "description": "Alert when generation takes too long"
37
- },
38
- "longGeneratingThresholdSec": {
39
- "type": "number",
40
- "default": 180,
41
- "public": true,
42
- "label": "Long Generation Threshold (sec)",
43
- "min": 30,
44
- "max": 600
45
- }
46
- }
47
- }
@@ -1,53 +0,0 @@
1
- {
2
- "type": "qwen-code-acp",
3
- "name": "Qwen Code (ACP)",
4
- "category": "acp",
5
- "displayName": "Qwen Code",
6
- "icon": "🟦",
7
- "install": "npm install -g @qwen-code/qwen-code (requires DASHSCOPE_API_KEY)",
8
- "spawn": {
9
- "command": "qwen-code",
10
- "args": [
11
- "--acp",
12
- "--experimental-skills"
13
- ],
14
- "shell": false
15
- },
16
- "auth": [
17
- {
18
- "type": "env_var",
19
- "id": "dashscope",
20
- "name": "DashScope API Key",
21
- "vars": [
22
- {
23
- "name": "DASHSCOPE_API_KEY"
24
- }
25
- ],
26
- "link": "https://dashscope.console.aliyun.com/apiKey"
27
- }
28
- ],
29
- "settings": {
30
- "approvalAlert": {
31
- "type": "boolean",
32
- "default": true,
33
- "public": true,
34
- "label": "Approval Alerts",
35
- "description": "Show notification when Qwen Code requires approval"
36
- },
37
- "longGeneratingAlert": {
38
- "type": "boolean",
39
- "default": true,
40
- "public": true,
41
- "label": "Long Generation Alert",
42
- "description": "Alert when generation takes too long"
43
- },
44
- "longGeneratingThresholdSec": {
45
- "type": "number",
46
- "default": 180,
47
- "public": true,
48
- "label": "Long Generation Threshold (sec)",
49
- "min": 30,
50
- "max": 600
51
- }
52
- }
53
- }
@@ -1,47 +0,0 @@
1
- {
2
- "type": "stakpak-acp",
3
- "name": "Stakpak (ACP)",
4
- "category": "acp",
5
- "displayName": "Stakpak",
6
- "icon": "🛡️",
7
- "install": "Download from https://github.com/stakpak/agent/releases",
8
- "spawn": {
9
- "command": "stakpak",
10
- "args": [
11
- "acp"
12
- ],
13
- "shell": false
14
- },
15
- "auth": [
16
- {
17
- "type": "agent",
18
- "id": "stakpak",
19
- "name": "Stakpak Auth",
20
- "description": "Configure provider through Stakpak setup"
21
- }
22
- ],
23
- "settings": {
24
- "approvalAlert": {
25
- "type": "boolean",
26
- "default": true,
27
- "public": true,
28
- "label": "Approval Alerts",
29
- "description": "Show notification when agent requires approval"
30
- },
31
- "longGeneratingAlert": {
32
- "type": "boolean",
33
- "default": true,
34
- "public": true,
35
- "label": "Long Generation Alert",
36
- "description": "Alert when generation takes too long"
37
- },
38
- "longGeneratingThresholdSec": {
39
- "type": "number",
40
- "default": 180,
41
- "public": true,
42
- "label": "Long Generation Threshold (sec)",
43
- "min": 30,
44
- "max": 600
45
- }
46
- }
47
- }
@@ -1,47 +0,0 @@
1
- {
2
- "type": "vtcode-acp",
3
- "name": "VT Code (ACP)",
4
- "category": "acp",
5
- "displayName": "VT Code",
6
- "icon": "🟣",
7
- "install": "npm install -g vtcode",
8
- "spawn": {
9
- "command": "vtcode",
10
- "args": [
11
- "acp"
12
- ],
13
- "shell": false
14
- },
15
- "auth": [
16
- {
17
- "type": "agent",
18
- "id": "vtcode",
19
- "name": "VT Code Auth",
20
- "description": "Configure provider through VT Code setup"
21
- }
22
- ],
23
- "settings": {
24
- "approvalAlert": {
25
- "type": "boolean",
26
- "default": true,
27
- "public": true,
28
- "label": "Approval Alerts",
29
- "description": "Show notification when agent requires approval"
30
- },
31
- "longGeneratingAlert": {
32
- "type": "boolean",
33
- "default": true,
34
- "public": true,
35
- "label": "Long Generation Alert",
36
- "description": "Alert when generation takes too long"
37
- },
38
- "longGeneratingThresholdSec": {
39
- "type": "number",
40
- "default": 180,
41
- "public": true,
42
- "label": "Long Generation Threshold (sec)",
43
- "min": 30,
44
- "max": 600
45
- }
46
- }
47
- }
@@ -1,78 +0,0 @@
1
- {
2
- "type": "claude-cli",
3
- "name": "Claude Code",
4
- "category": "cli",
5
- "aliases": [
6
- "claude",
7
- "claude-code"
8
- ],
9
- "icon": "🤖",
10
- "displayName": "Claude Code",
11
- "settings": {
12
- "mode": {
13
- "type": "select",
14
- "default": "terminal",
15
- "public": true,
16
- "label": "표시 모드",
17
- "description": "terminal: PTY 터미널 뷰, chat: 파싱된 대화 뷰",
18
- "options": [
19
- "terminal",
20
- "chat"
21
- ]
22
- },
23
- "notifications": {
24
- "type": "boolean",
25
- "default": true,
26
- "public": true,
27
- "label": "알림",
28
- "description": "상태 변경 시 알림을 표시합니다"
29
- },
30
- "autoApprove": {
31
- "type": "boolean",
32
- "default": false,
33
- "public": true,
34
- "label": "자동 승인",
35
- "description": "도구 실행 승인을 자동으로 허용합니다"
36
- }
37
- },
38
- "binary": "claude",
39
- "spawn": {
40
- "command": "claude",
41
- "args": [],
42
- "shell": false,
43
- "env": {}
44
- },
45
- "patterns": {
46
- "prompt": [
47
- {},
48
- {},
49
- {},
50
- {},
51
- {},
52
- {},
53
- {}
54
- ],
55
- "generating": [
56
- {},
57
- {},
58
- {},
59
- {},
60
- {}
61
- ],
62
- "approval": [
63
- {},
64
- {},
65
- {},
66
- {},
67
- {},
68
- {},
69
- {},
70
- {},
71
- {}
72
- ],
73
- "ready": [
74
- {},
75
- {}
76
- ]
77
- }
78
- }
@@ -1,60 +0,0 @@
1
- {
2
- "type": "codex-cli",
3
- "name": "Codex CLI",
4
- "category": "cli",
5
- "aliases": [
6
- "codex"
7
- ],
8
- "icon": "🧠",
9
- "displayName": "Codex CLI",
10
- "settings": {
11
- "mode": {
12
- "type": "select",
13
- "default": "terminal",
14
- "public": true,
15
- "label": "표시 모드",
16
- "options": [
17
- "terminal",
18
- "chat"
19
- ]
20
- },
21
- "notifications": {
22
- "type": "boolean",
23
- "default": true,
24
- "public": true,
25
- "label": "알림"
26
- }
27
- },
28
- "binary": "codex",
29
- "spawn": {
30
- "command": "codex",
31
- "args": [
32
- "--full-auto"
33
- ],
34
- "shell": false,
35
- "env": {}
36
- },
37
- "patterns": {
38
- "prompt": [
39
- {},
40
- {},
41
- {}
42
- ],
43
- "generating": [
44
- {},
45
- {},
46
- {}
47
- ],
48
- "approval": [
49
- {},
50
- {},
51
- {},
52
- {},
53
- {}
54
- ],
55
- "ready": [
56
- {},
57
- {}
58
- ]
59
- }
60
- }
@@ -1,64 +0,0 @@
1
- {
2
- "type": "gemini-cli",
3
- "name": "Gemini CLI",
4
- "category": "cli",
5
- "aliases": [
6
- "gemini"
7
- ],
8
- "icon": "♊",
9
- "displayName": "Gemini CLI",
10
- "settings": {
11
- "mode": {
12
- "type": "select",
13
- "default": "terminal",
14
- "public": true,
15
- "label": "표시 모드",
16
- "options": [
17
- "terminal",
18
- "chat"
19
- ]
20
- },
21
- "notifications": {
22
- "type": "boolean",
23
- "default": true,
24
- "public": true,
25
- "label": "알림"
26
- }
27
- },
28
- "binary": "gemini",
29
- "spawn": {
30
- "command": "gemini",
31
- "args": [
32
- "--yolo"
33
- ],
34
- "shell": true,
35
- "env": {}
36
- },
37
- "patterns": {
38
- "prompt": [
39
- {},
40
- {},
41
- {}
42
- ],
43
- "generating": [
44
- {},
45
- {},
46
- {},
47
- {},
48
- {},
49
- {}
50
- ],
51
- "approval": [
52
- {},
53
- {},
54
- {},
55
- {},
56
- {},
57
- {}
58
- ],
59
- "ready": [
60
- {},
61
- {}
62
- ]
63
- }
64
- }
@@ -1,11 +0,0 @@
1
- {
2
- "type": "cline",
3
- "name": "Cline",
4
- "category": "extension",
5
- "extensionId": "saoudrizwan.claude-dev",
6
- "extensionIdPattern": "extensionId=saoudrizwan\\.claude-dev",
7
- "extensionIdPattern_flags": "i",
8
- "vscodeCommands": {
9
- "focusPanel": "claude-dev.SidebarProvider.focus"
10
- }
11
- }
@@ -1,48 +0,0 @@
1
- /**
2
- * Cline v1 — focus_editor
3
- *
4
- * Cline webview iframe 내부의 입력 필드에 포커스.
5
- * send_message 전에 호출하거나, 대시보드 "Focus" 버튼에 사용.
6
- *
7
- * 최종 확인: 2026-03-07
8
- */
9
- (() => {
10
- try {
11
- const inner = document.querySelector('iframe');
12
- const doc = inner?.contentDocument || inner?.contentWindow?.document;
13
- if (!doc) return 'no doc';
14
-
15
- // data-testid 우선 → fallback
16
- let target = doc.querySelector('[data-testid="chat-input"]');
17
- if (!target) {
18
- const textareas = doc.querySelectorAll('textarea');
19
- for (const ta of textareas) {
20
- if (ta.offsetParent !== null && ta.offsetHeight > 20) {
21
- target = ta;
22
- break;
23
- }
24
- }
25
- }
26
- if (!target) {
27
- // contenteditable fallback
28
- const editables = doc.querySelectorAll('[contenteditable="true"]');
29
- for (const el of editables) {
30
- if (el.offsetParent !== null && el.offsetHeight > 10) {
31
- target = el;
32
- break;
33
- }
34
- }
35
- }
36
- if (!target) return 'no input';
37
-
38
- target.focus();
39
- // 커서를 끝으로 이동
40
- if (target.tagName === 'TEXTAREA' || target.tagName === 'INPUT') {
41
- const len = (target.value || '').length;
42
- target.setSelectionRange(len, len);
43
- }
44
- return 'focused';
45
- } catch (e) {
46
- return 'error: ' + e.message;
47
- }
48
- })()
@@ -1,100 +0,0 @@
1
- /**
2
- * Cline v1 — list_chats (Fiber + DOM 이중 접근)
3
- *
4
- * 1차: React Fiber에서 taskHistory 배열 추출
5
- * __reactFiber, __reactProps, __reactContainer 모두 탐색
6
- * 2차: Virtuoso DOM 파싱
7
- *
8
- * 반환: JSON 문자열 — [{id, title, status, time, cost, tokensIn, tokensOut, modelId}]
9
- *
10
- * 최종 확인: 2026-03-07
11
- */
12
- (() => {
13
- try {
14
- const inner = document.querySelector('iframe');
15
- const doc = inner?.contentDocument || inner?.contentWindow?.document;
16
- if (!doc) return JSON.stringify({ error: 'no_doc', panel: 'hidden' });
17
-
18
- // Fiber 키 찾기 helper — __reactFiber, __reactProps, __reactContainer 모두 검색
19
- const findFiberKey = (el) => Object.keys(el).find(k =>
20
- k.startsWith('__reactFiber') || k.startsWith('__reactProps') || k.startsWith('__reactContainer'));
21
-
22
- const getFiber = (el) => {
23
- const fk = findFiberKey(el);
24
- if (!fk) return null;
25
- let fiber = el[fk];
26
- // __reactContainer인 경우 내부 fiber tree root로 접근
27
- if (fk.startsWith('__reactContainer') && fiber?._internalRoot?.current) {
28
- fiber = fiber._internalRoot.current;
29
- }
30
- return fiber;
31
- };
32
-
33
- // ─── 1차: Fiber props에서 taskHistory 찾기 ───
34
- const allEls = doc.querySelectorAll('*');
35
- let taskHistory = null;
36
-
37
- for (const el of allEls) {
38
- let fiber = getFiber(el);
39
- if (!fiber) continue;
40
-
41
- for (let d = 0; d < 30 && fiber; d++) {
42
- const props = fiber.memoizedProps || fiber.pendingProps;
43
- if (props && props.taskHistory && Array.isArray(props.taskHistory)) {
44
- taskHistory = props.taskHistory;
45
- break;
46
- }
47
- // memoizedState 체인에서도 탐색
48
- if (fiber.memoizedState) {
49
- let st = fiber.memoizedState;
50
- while (st) {
51
- try {
52
- const ms = st.memoizedState;
53
- if (ms && typeof ms === 'object' && !Array.isArray(ms)) {
54
- if (ms.taskHistory && Array.isArray(ms.taskHistory)) {
55
- taskHistory = ms.taskHistory;
56
- break;
57
- }
58
- }
59
- } catch { }
60
- st = st.next;
61
- }
62
- }
63
- if (taskHistory) break;
64
- fiber = fiber.return;
65
- }
66
- if (taskHistory) break;
67
- }
68
-
69
- if (taskHistory && taskHistory.length > 0) {
70
- const results = taskHistory.slice(0, 50).map((task, i) => ({
71
- id: task.id || String(task.ts),
72
- title: (task.task || '').substring(0, 120),
73
- status: i === 0 ? 'current' : '',
74
- time: task.ts ? new Date(task.ts).toISOString() : '',
75
- cost: task.totalCost ? `$${task.totalCost.toFixed(4)}` : '',
76
- tokensIn: task.tokensIn || 0,
77
- tokensOut: task.tokensOut || 0,
78
- modelId: task.modelId || '',
79
- size: task.size || 0,
80
- isFavorited: !!task.isFavorited,
81
- }));
82
- return JSON.stringify(results);
83
- }
84
-
85
- // ─── 2차: Virtuoso DOM 파싱 ───
86
- const items = doc.querySelectorAll('[data-item-index]');
87
- if (items.length > 0) {
88
- const results = Array.from(items).slice(0, 50).map(el => ({
89
- id: el.getAttribute('data-item-index') || '',
90
- title: (el.textContent || '').trim().substring(0, 120),
91
- status: '',
92
- }));
93
- return JSON.stringify(results);
94
- }
95
-
96
- return JSON.stringify([]);
97
- } catch (e) {
98
- return JSON.stringify({ error: e.message || String(e) });
99
- }
100
- })()
@@ -1,43 +0,0 @@
1
- /**
2
- * Cline — list_models
3
- * 드롭다운에서 사용 가능한 모델 목록 + 현재 선택된 모델 반환
4
- * → { models: string[], current: string }
5
- */
6
- (async () => {
7
- try {
8
- const inner = document.querySelector('iframe');
9
- const doc = inner?.contentDocument || inner?.contentWindow?.document;
10
- if (!doc) return JSON.stringify({ models: [], current: '', error: 'no doc' });
11
-
12
- // 현재 모델: mode-switch 또는 model selector에서 읽기
13
- let current = '';
14
- const modeSwitch = doc.querySelector('[data-testid="mode-switch"]');
15
- if (modeSwitch) current = (modeSwitch.textContent || '').trim();
16
- if (!current) {
17
- const modelSel = doc.querySelector('[data-testid*="model"], [aria-label*="model" i]');
18
- if (modelSel) current = (modelSel.textContent || '').trim();
19
- }
20
-
21
- // 드롭다운 트리거 찾기
22
- const trigger = doc.querySelector('[data-testid="model-selector"], [data-testid*="model-dropdown"], [data-testid="dropdown-trigger"]');
23
- if (!trigger) return JSON.stringify({ models: [], current, error: 'no model trigger' });
24
-
25
- // 드롭다운 열기
26
- trigger.click();
27
- await new Promise(r => setTimeout(r, 300));
28
-
29
- // 옵션 수집
30
- const options = doc.querySelectorAll('[data-testid*="dropdown-option"], [role="option"], [class*="dropdown"] [class*="item"], [class*="listbox"] [class*="option"]');
31
- const models = [];
32
- for (const opt of options) {
33
- const text = (opt.textContent || '').trim();
34
- if (text && text.length > 1 && text.length < 100) models.push(text);
35
- }
36
-
37
- // 닫기
38
- doc.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));
39
- if (trigger.click) trigger.click(); // fallback close
40
-
41
- return JSON.stringify({ models: [...new Set(models)], current });
42
- } catch (e) { return JSON.stringify({ models: [], current: '', error: e.message }); }
43
- })()
@@ -1,35 +0,0 @@
1
- /**
2
- * Cline — list_modes
3
- * 모드 selector에서 사용 가능한 모드 목록 + 현재 모드 반환
4
- * → { modes: string[], current: string }
5
- */
6
- (async () => {
7
- try {
8
- const inner = document.querySelector('iframe');
9
- const doc = inner?.contentDocument || inner?.contentWindow?.document;
10
- if (!doc) return JSON.stringify({ modes: [], current: '', error: 'no doc' });
11
-
12
- // 현재 모드
13
- const trigger = doc.querySelector('[data-testid="mode-selector-trigger"], [data-testid="mode-switch"]');
14
- if (!trigger) return JSON.stringify({ modes: [], current: '', error: 'no mode trigger' });
15
- const current = (trigger.textContent || '').trim();
16
-
17
- // 드롭다운 열기
18
- trigger.click();
19
- await new Promise(r => setTimeout(r, 300));
20
-
21
- // 옵션 수집
22
- const options = doc.querySelectorAll('[data-testid*="mode-option"], [role="option"], [class*="dropdown"] [class*="item"], [class*="listbox"] [class*="option"]');
23
- const modes = [];
24
- for (const opt of options) {
25
- const text = (opt.textContent || '').trim();
26
- if (text && text.length > 1 && text.length < 50) modes.push(text);
27
- }
28
-
29
- // 닫기
30
- doc.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));
31
- if (trigger.click) trigger.click(); // fallback close
32
-
33
- return JSON.stringify({ modes: [...new Set(modes)], current });
34
- } catch (e) { return JSON.stringify({ modes: [], current: '', error: e.message }); }
35
- })()