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.
- package/dist/cli-entrypoint.js +18710 -1198
- package/dist/cli-entrypoint.js.map +1 -1
- package/dist/index.js +18720 -1228
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- 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 -47
- package/providers/_builtin/acp/amp/provider.json +0 -45
- package/providers/_builtin/acp/auggie/provider.json +0 -50
- package/providers/_builtin/acp/autodev/provider.json +0 -47
- package/providers/_builtin/acp/autohand/provider.json +0 -45
- package/providers/_builtin/acp/blackbox-ai/provider.json +0 -47
- package/providers/_builtin/acp/claude-agent/provider.json +0 -50
- package/providers/_builtin/acp/cline-acp/provider.json +0 -47
- package/providers/_builtin/acp/code-assistant/provider.json +0 -47
- package/providers/_builtin/acp/codebuddy/provider.json +0 -47
- package/providers/_builtin/acp/codex-cli/provider.json +0 -50
- package/providers/_builtin/acp/corust-agent/provider.json +0 -45
- package/providers/_builtin/acp/crow-cli/provider.json +0 -47
- package/providers/_builtin/acp/cursor-acp/provider.json +0 -47
- package/providers/_builtin/acp/deepagents/provider.json +0 -45
- package/providers/_builtin/acp/dimcode/provider.json +0 -47
- package/providers/_builtin/acp/docker-cagent/provider.json +0 -50
- package/providers/_builtin/acp/factory-droid/provider.json +0 -53
- package/providers/_builtin/acp/fast-agent/provider.json +0 -45
- package/providers/_builtin/acp/fount/provider.json +0 -47
- package/providers/_builtin/acp/gemini-cli/provider.json +0 -107
- package/providers/_builtin/acp/github-copilot/provider.json +0 -47
- package/providers/_builtin/acp/goose/provider.json +0 -50
- package/providers/_builtin/acp/junie/provider.json +0 -45
- package/providers/_builtin/acp/kilo/provider.json +0 -45
- package/providers/_builtin/acp/kimi-cli/provider.json +0 -50
- package/providers/_builtin/acp/kiro-cli/provider.json +0 -47
- package/providers/_builtin/acp/minion-code/provider.json +0 -45
- package/providers/_builtin/acp/mistral-vibe/provider.json +0 -50
- package/providers/_builtin/acp/nova/provider.json +0 -47
- package/providers/_builtin/acp/openclaw/provider.json +0 -47
- package/providers/_builtin/acp/opencode/provider.json +0 -45
- package/providers/_builtin/acp/openhands/provider.json +0 -47
- package/providers/_builtin/acp/pi-acp/provider.json +0 -45
- package/providers/_builtin/acp/qoder/provider.json +0 -47
- package/providers/_builtin/acp/qwen-code/provider.json +0 -53
- package/providers/_builtin/acp/stakpak/provider.json +0 -47
- package/providers/_builtin/acp/vtcode/provider.json +0 -47
- package/providers/_builtin/cli/claude-cli/provider.json +0 -78
- package/providers/_builtin/cli/codex-cli/provider.json +0 -60
- package/providers/_builtin/cli/gemini-cli/provider.json +0 -64
- package/providers/_builtin/extension/cline/provider.json +0 -11
- 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 -11
- package/providers/_builtin/extension/roo-code/scripts.js +0 -659
- package/providers/_builtin/ide/antigravity/provider.json +0 -32
- package/providers/_builtin/ide/antigravity/scripts/focus_editor.js +0 -20
- package/providers/_builtin/ide/antigravity/scripts/list_chats.js +0 -137
- package/providers/_builtin/ide/antigravity/scripts/list_models.js +0 -38
- package/providers/_builtin/ide/antigravity/scripts/list_modes.js +0 -48
- 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 -34
- package/providers/_builtin/ide/antigravity/scripts/set_model.js +0 -47
- package/providers/_builtin/ide/antigravity/scripts/switch_session.js +0 -114
- package/providers/_builtin/ide/antigravity/scripts.js +0 -73
- package/providers/_builtin/ide/cursor/provider.json +0 -35
- package/providers/_builtin/ide/cursor/scripts.js +0 -452
- package/providers/_builtin/ide/kiro/provider.json +0 -36
- 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 -36
- 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 -35
- 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 -33
- package/providers/_builtin/ide/vscode-insiders/provider.json +0 -31
- package/providers/_builtin/ide/vscodium/provider.json +0 -32
- package/providers/_builtin/ide/windsurf/provider.json +0 -22
- 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,206 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cline v1 — switch_session (Fiber hooks → showTaskWithId gRPC)
|
|
3
|
-
*
|
|
4
|
-
* 전략:
|
|
5
|
-
* 1. Fiber DFS에서 taskHistory, showHistoryView 찾기
|
|
6
|
-
* 2. Done 클릭으로 히스토리 닫기 → showHistoryView() → 재열기
|
|
7
|
-
* 3. Virtuoso 렌더링 대기 (최대 5초, 500ms 간격 재시도 + scroll/resize 트리거)
|
|
8
|
-
* 4. 렌더된 아이템의 Fiber hooks에서 showTaskWithId 콜백 추출
|
|
9
|
-
* 5. showTaskWithId(taskId) 호출 → gRPC로 Task 전환
|
|
10
|
-
*
|
|
11
|
-
* 파라미터: ${ SESSION_ID } — task ID (숫자 문자열) 또는 제목
|
|
12
|
-
* 최종 확인: 2026-03-07
|
|
13
|
-
*/
|
|
14
|
-
(async () => {
|
|
15
|
-
try {
|
|
16
|
-
const inner = document.querySelector('iframe');
|
|
17
|
-
const doc = inner?.contentDocument || inner?.contentWindow?.document;
|
|
18
|
-
if (!doc) return false;
|
|
19
|
-
|
|
20
|
-
const sessionId = ${ SESSION_ID };
|
|
21
|
-
if (!sessionId) return false;
|
|
22
|
-
|
|
23
|
-
const findFiberKey = (el) => Object.keys(el).find(k =>
|
|
24
|
-
k.startsWith('__reactFiber') || k.startsWith('__reactProps') || k.startsWith('__reactContainer'));
|
|
25
|
-
const getFiber = (el) => {
|
|
26
|
-
const fk = findFiberKey(el);
|
|
27
|
-
if (!fk) return null;
|
|
28
|
-
let fiber = el[fk];
|
|
29
|
-
if (fk.startsWith('__reactContainer') && fiber?._internalRoot?.current)
|
|
30
|
-
fiber = fiber._internalRoot.current;
|
|
31
|
-
return fiber;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
// ─── 1. Fiber DFS에서 taskHistory, showHistoryView 찾기 ───
|
|
35
|
-
const root = doc.getElementById('root');
|
|
36
|
-
if (!root) return false;
|
|
37
|
-
const rootFk = findFiberKey(root);
|
|
38
|
-
if (!rootFk) return false;
|
|
39
|
-
let rootFiber = root[rootFk];
|
|
40
|
-
if (rootFk.startsWith('__reactContainer') && rootFiber?._internalRoot?.current)
|
|
41
|
-
rootFiber = rootFiber._internalRoot.current;
|
|
42
|
-
|
|
43
|
-
let showHistoryView = null;
|
|
44
|
-
let taskHistory = null;
|
|
45
|
-
const visited = new Set();
|
|
46
|
-
const scanFiber = (f, depth) => {
|
|
47
|
-
if (!f || depth > 60 || visited.has(f)) return;
|
|
48
|
-
visited.add(f);
|
|
49
|
-
const props = f.memoizedProps || f.pendingProps;
|
|
50
|
-
if (props) {
|
|
51
|
-
if (typeof props.showHistoryView === 'function' && !showHistoryView)
|
|
52
|
-
showHistoryView = props.showHistoryView;
|
|
53
|
-
if (props.taskHistory && Array.isArray(props.taskHistory) && !taskHistory)
|
|
54
|
-
taskHistory = props.taskHistory;
|
|
55
|
-
}
|
|
56
|
-
if (!taskHistory && f.memoizedState) {
|
|
57
|
-
let st = f.memoizedState;
|
|
58
|
-
while (st) {
|
|
59
|
-
try {
|
|
60
|
-
const ms = st.memoizedState;
|
|
61
|
-
if (ms?.taskHistory && Array.isArray(ms.taskHistory)) {
|
|
62
|
-
taskHistory = ms.taskHistory;
|
|
63
|
-
break;
|
|
64
|
-
}
|
|
65
|
-
} catch { }
|
|
66
|
-
st = st.next;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
if (f.child) scanFiber(f.child, depth + 1);
|
|
70
|
-
if (f.sibling) scanFiber(f.sibling, depth + 1);
|
|
71
|
-
};
|
|
72
|
-
scanFiber(rootFiber, 0);
|
|
73
|
-
|
|
74
|
-
if (!taskHistory || taskHistory.length === 0) return false;
|
|
75
|
-
|
|
76
|
-
// 대상 task 찾기 (ID 또는 제목 매칭)
|
|
77
|
-
const norm = s => (s || '').trim().toLowerCase().replace(/\s+/g, ' ');
|
|
78
|
-
const idNorm = norm(sessionId);
|
|
79
|
-
let targetTask = taskHistory.find(t => String(t.id) === sessionId);
|
|
80
|
-
if (!targetTask) {
|
|
81
|
-
targetTask = taskHistory.find(t => {
|
|
82
|
-
const title = norm(t.task || '');
|
|
83
|
-
return title.includes(idNorm) || idNorm.includes(title);
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
if (!targetTask) return false;
|
|
87
|
-
const targetId = String(targetTask.id);
|
|
88
|
-
|
|
89
|
-
// ─── 2. showHistoryView가 없으면 Fiber root DFS 재시도 ───
|
|
90
|
-
if (!showHistoryView) {
|
|
91
|
-
// DOM 요소 기반 탐색 (Fiber root에서 못 찾은 경우)
|
|
92
|
-
for (const el of doc.querySelectorAll('*')) {
|
|
93
|
-
let fiber = getFiber(el);
|
|
94
|
-
for (let d = 0; d < 20 && fiber; d++) {
|
|
95
|
-
const p = fiber.memoizedProps;
|
|
96
|
-
if (p && typeof p.showHistoryView === 'function') {
|
|
97
|
-
showHistoryView = p.showHistoryView;
|
|
98
|
-
break;
|
|
99
|
-
}
|
|
100
|
-
fiber = fiber.return;
|
|
101
|
-
}
|
|
102
|
-
if (showHistoryView) break;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
if (!showHistoryView) return false;
|
|
106
|
-
|
|
107
|
-
// ─── 3. 히스토리 뷰 토글 (닫기 → 열기) ───
|
|
108
|
-
// Done 버튼으로 닫기
|
|
109
|
-
const doneBtn = Array.from(doc.querySelectorAll('button'))
|
|
110
|
-
.find(b => b.textContent.trim() === 'Done' && b.offsetHeight > 0);
|
|
111
|
-
if (doneBtn) {
|
|
112
|
-
doneBtn.click();
|
|
113
|
-
await new Promise(r => setTimeout(r, 400));
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// 히스토리 열기
|
|
117
|
-
showHistoryView();
|
|
118
|
-
|
|
119
|
-
// ─── 4. Virtuoso 렌더링 대기 (최대 5초, 500ms 간격 재시도) ───
|
|
120
|
-
let il = null;
|
|
121
|
-
for (let attempt = 0; attempt < 10; attempt++) {
|
|
122
|
-
await new Promise(r => setTimeout(r, 500));
|
|
123
|
-
// scroll + resize 트리거
|
|
124
|
-
const sd = doc.querySelector('.overflow-y-scroll, [data-testid=virtuoso-scroller]');
|
|
125
|
-
if (sd) {
|
|
126
|
-
sd.dispatchEvent(new Event('scroll', { bubbles: true }));
|
|
127
|
-
doc.defaultView?.dispatchEvent(new Event('resize'));
|
|
128
|
-
}
|
|
129
|
-
il = doc.querySelector('[data-testid=virtuoso-item-list]');
|
|
130
|
-
if (il && il.children.length > 0) break;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
if (!il || il.children.length === 0) return false;
|
|
134
|
-
|
|
135
|
-
// ─── 5. Fiber hooks에서 showTaskWithId 추출 ───
|
|
136
|
-
let showTaskFn = null;
|
|
137
|
-
const findFiberKeySimple = (el) => Object.keys(el).find(k => k.startsWith('__reactFiber'));
|
|
138
|
-
|
|
139
|
-
for (const child of il.children) {
|
|
140
|
-
// child 또는 child 내부의 모든 요소에서 탐색
|
|
141
|
-
const targets = [child, ...child.querySelectorAll('*')];
|
|
142
|
-
for (const el of targets) {
|
|
143
|
-
const fk = findFiberKeySimple(el);
|
|
144
|
-
if (!fk) continue;
|
|
145
|
-
let fiber = el[fk];
|
|
146
|
-
for (let d = 0; d < 30 && fiber; d++) {
|
|
147
|
-
if (fiber.memoizedState) {
|
|
148
|
-
let hook = fiber.memoizedState;
|
|
149
|
-
let hookIdx = 0;
|
|
150
|
-
while (hook && hookIdx < 30) {
|
|
151
|
-
const ms = hook.memoizedState;
|
|
152
|
-
if (Array.isArray(ms) && ms.length === 2 && typeof ms[0] === 'function') {
|
|
153
|
-
const fnSrc = ms[0].toString();
|
|
154
|
-
if (fnSrc.includes('showTaskWithId')) {
|
|
155
|
-
showTaskFn = ms[0];
|
|
156
|
-
break;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
hook = hook.next;
|
|
160
|
-
hookIdx++;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
if (showTaskFn) break;
|
|
164
|
-
fiber = fiber.return;
|
|
165
|
-
}
|
|
166
|
-
if (showTaskFn) break;
|
|
167
|
-
}
|
|
168
|
-
if (showTaskFn) break;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
// Fallback: Fiber DFS 전체 탐색
|
|
172
|
-
if (!showTaskFn) {
|
|
173
|
-
const visited2 = new Set();
|
|
174
|
-
const dfs2 = (f, depth) => {
|
|
175
|
-
if (!f || depth > 60 || visited2.has(f) || showTaskFn) return;
|
|
176
|
-
visited2.add(f);
|
|
177
|
-
if (f.memoizedState) {
|
|
178
|
-
let h = f.memoizedState; let i = 0;
|
|
179
|
-
while (h && i < 30) {
|
|
180
|
-
const ms = h.memoizedState;
|
|
181
|
-
if (Array.isArray(ms) && ms.length === 2 && typeof ms[0] === 'function' &&
|
|
182
|
-
ms[0].toString().includes('showTaskWithId')) {
|
|
183
|
-
showTaskFn = ms[0]; return;
|
|
184
|
-
}
|
|
185
|
-
h = h.next; i++;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
if (f.child) dfs2(f.child, depth + 1);
|
|
189
|
-
if (f.sibling) dfs2(f.sibling, depth + 1);
|
|
190
|
-
};
|
|
191
|
-
dfs2(rootFiber, 0);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
if (!showTaskFn) return false;
|
|
195
|
-
|
|
196
|
-
// ─── 6. showTaskWithId(targetId) 호출 ───
|
|
197
|
-
try {
|
|
198
|
-
await showTaskFn(targetId);
|
|
199
|
-
} catch {
|
|
200
|
-
return false;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
await new Promise(r => setTimeout(r, 1500));
|
|
204
|
-
return true;
|
|
205
|
-
} catch { return false; }
|
|
206
|
-
})()
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CDP Scripts for Cline
|
|
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.readChat = function readChat() {
|
|
15
|
-
return loadScript('read_chat.js');
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
module.exports.sendMessage = function sendMessage(text) {
|
|
19
|
-
const script = loadScript('send_message.js');
|
|
20
|
-
if (!script) return null;
|
|
21
|
-
return script.replace(/\$\{\s*MESSAGE\s*\}/g, JSON.stringify(text));
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
module.exports.listSessions = function listSessions() {
|
|
25
|
-
return loadScript('list_chats.js');
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
module.exports.switchSession = function switchSession(sessionId) {
|
|
29
|
-
const script = loadScript('switch_session.js');
|
|
30
|
-
if (!script) return null;
|
|
31
|
-
return script.replace(/\$\{\s*SESSION_ID\s*\}/g, JSON.stringify(sessionId));
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
module.exports.newSession = function newSession() {
|
|
35
|
-
return loadScript('new_session.js');
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
module.exports.resolveAction = function resolveAction(action) {
|
|
39
|
-
const script = loadScript('resolve_action.js');
|
|
40
|
-
if (!script) return null;
|
|
41
|
-
return script.replace(/\$\{\s*ACTION\s*\}/g, JSON.stringify(action));
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
module.exports.focusEditor = function focusEditor() {
|
|
45
|
-
return loadScript('focus_editor.js');
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
module.exports.openPanel = function openPanel() {
|
|
49
|
-
return loadScript('open_panel.js');
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
module.exports.listModels = function listModels() {
|
|
53
|
-
return loadScript('list_models.js');
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
module.exports.setModel = function setModel(params) {
|
|
57
|
-
const model = params?.model || params;
|
|
58
|
-
const script = loadScript('set_model.js');
|
|
59
|
-
if (!script) return null;
|
|
60
|
-
return script.replace(/\$\{\s*MODEL\s*\}/g, JSON.stringify(model));
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
module.exports.listModes = function listModes() {
|
|
64
|
-
return loadScript('list_modes.js');
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
module.exports.setMode = function setMode(params) {
|
|
68
|
-
const mode = params?.mode || params;
|
|
69
|
-
const script = loadScript('set_mode.js');
|
|
70
|
-
if (!script) return null;
|
|
71
|
-
return script.replace(/\$\{\s*MODE\s*\}/g, JSON.stringify(mode));
|
|
72
|
-
};
|
|
73
|
-
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "roo-code",
|
|
3
|
-
"name": "Roo Code",
|
|
4
|
-
"category": "extension",
|
|
5
|
-
"extensionId": "RooVeterinaryInc.roo-cline",
|
|
6
|
-
"extensionIdPattern": "extensionId=RooVeterinaryInc\\.roo-cline",
|
|
7
|
-
"extensionIdPattern_flags": "i",
|
|
8
|
-
"vscodeCommands": {
|
|
9
|
-
"focusPanel": "roo-cline.SidebarProvider.focus"
|
|
10
|
-
}
|
|
11
|
-
}
|