thepopebot 1.2.76-beta.13 → 1.2.76-beta.14
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/bin/cli.js +1 -0
- package/lib/ai/index.js +12 -3
- package/lib/llm-providers.js +1 -0
- package/package.json +1 -1
- package/setup/lib/providers.mjs +2 -1
- package/templates/docker-compose.custom.yml +1 -0
package/bin/cli.js
CHANGED
package/lib/ai/index.js
CHANGED
|
@@ -136,6 +136,9 @@ async function* chatStream(threadId, message, attachments = [], options = {}) {
|
|
|
136
136
|
const branch = options.branch;
|
|
137
137
|
const codeModeType = options.codeModeType || 'plan';
|
|
138
138
|
|
|
139
|
+
// Resolve workspace — for existing chats, read scope from DB (client may not resend it after refresh)
|
|
140
|
+
let resolvedScope = options.scope || null;
|
|
141
|
+
|
|
139
142
|
if (!existingChat) {
|
|
140
143
|
// Create workspace if not already provided
|
|
141
144
|
if (!workspaceId) {
|
|
@@ -143,7 +146,7 @@ async function* chatStream(threadId, message, attachments = [], options = {}) {
|
|
|
143
146
|
const workspace = createCodeWorkspace(options.userId || 'unknown', {
|
|
144
147
|
repo: repo,
|
|
145
148
|
branch: branch,
|
|
146
|
-
scope:
|
|
149
|
+
scope: resolvedScope,
|
|
147
150
|
});
|
|
148
151
|
workspaceId = workspace.id;
|
|
149
152
|
const { generateRandomName } = await import('../utils/random-name.js');
|
|
@@ -155,6 +158,12 @@ async function* chatStream(threadId, message, attachments = [], options = {}) {
|
|
|
155
158
|
linkChatToWorkspace(threadId, workspaceId);
|
|
156
159
|
} else {
|
|
157
160
|
workspaceId = workspaceId || existingChat.codeWorkspaceId;
|
|
161
|
+
// Read scope from workspace record — client may not resend after page refresh
|
|
162
|
+
if (!resolvedScope && workspaceId) {
|
|
163
|
+
const { getCodeWorkspaceById } = await import('../db/code-workspaces.js');
|
|
164
|
+
const ws = getCodeWorkspaceById(workspaceId);
|
|
165
|
+
if (ws?.scope) resolvedScope = ws.scope;
|
|
166
|
+
}
|
|
158
167
|
}
|
|
159
168
|
|
|
160
169
|
// ── SDK path: direct in-process SDK call (no LangGraph, no Docker) ──
|
|
@@ -205,7 +214,7 @@ async function* chatStream(threadId, message, attachments = [], options = {}) {
|
|
|
205
214
|
}
|
|
206
215
|
|
|
207
216
|
// 2. Resolve scope (working directory + skills)
|
|
208
|
-
const scope =
|
|
217
|
+
const scope = resolvedScope;
|
|
209
218
|
const chatMode = isCodeMode ? 'code' : 'agent';
|
|
210
219
|
const { workingDir, skillsDir } = resolveAgentScope(repoDir, scope);
|
|
211
220
|
|
|
@@ -335,7 +344,7 @@ async function* chatStream(threadId, message, attachments = [], options = {}) {
|
|
|
335
344
|
try {
|
|
336
345
|
const stream = await agent.stream(
|
|
337
346
|
{ messages: [new HumanMessage({ content: messageContent })] },
|
|
338
|
-
{ configurable: { thread_id: threadId, workspaceId, repo, branch, codeModeType, scope:
|
|
347
|
+
{ configurable: { thread_id: threadId, workspaceId, repo, branch, codeModeType, scope: resolvedScope, streamCallback }, streamMode: 'messages' }
|
|
339
348
|
);
|
|
340
349
|
|
|
341
350
|
const toolCallNames = {};
|
package/lib/llm-providers.js
CHANGED
|
@@ -17,6 +17,7 @@ export const BUILTIN_PROVIDERS = {
|
|
|
17
17
|
],
|
|
18
18
|
models: [
|
|
19
19
|
{ id: 'claude-sonnet-4-6', name: 'Claude Sonnet 4.6', default: true },
|
|
20
|
+
{ id: 'claude-opus-4-7', name: 'Claude Opus 4.7' },
|
|
20
21
|
{ id: 'claude-opus-4-6', name: 'Claude Opus 4.6' },
|
|
21
22
|
{ id: 'claude-haiku-4-5-20251001', name: 'Claude Haiku 4.5' },
|
|
22
23
|
{ id: 'claude-sonnet-4-20250514', name: 'Claude Sonnet 4' },
|
package/package.json
CHANGED
package/setup/lib/providers.mjs
CHANGED
|
@@ -14,7 +14,8 @@ export const PROVIDERS = {
|
|
|
14
14
|
builtin: true,
|
|
15
15
|
oauthSupported: true,
|
|
16
16
|
models: [
|
|
17
|
-
{ id: 'claude-opus-4-
|
|
17
|
+
{ id: 'claude-opus-4-7', name: 'Claude Opus 4.7', default: true },
|
|
18
|
+
{ id: 'claude-opus-4-6', name: 'Claude Opus 4.6' },
|
|
18
19
|
{ id: 'claude-sonnet-4-6', name: 'Claude Sonnet 4.6' },
|
|
19
20
|
{ id: 'claude-haiku-4-5-20251001', name: 'Claude Haiku 4.5' },
|
|
20
21
|
],
|