@chatpanel/bridge 0.8.0 → 0.9.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/package.json +1 -1
- package/src/engines/antigravity.js +1 -0
- package/src/engines/claude.js +1 -0
- package/src/engines/codex.js +1 -0
- package/src/engines/custom.js +4 -0
- package/src/server.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatpanel/bridge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Local bridge that exposes the AI coding agents installed on your machine — Claude Code (CLI), Codex (CLI), and Gemini CLI — to the ChatPanel Chrome extension over a localhost SSE endpoint. Bring your own agent.",
|
|
6
6
|
"keywords": [
|
|
@@ -115,6 +115,7 @@ export async function chat({ messages, system, options, images }, emit) {
|
|
|
115
115
|
const args = ['-p', prompt];
|
|
116
116
|
if (options.model) args.push('--model', options.model);
|
|
117
117
|
if (options.permissionMode === 'bypassPermissions') args.push('--dangerously-skip-permissions');
|
|
118
|
+
if (options.extraArgs) args.push(...String(options.extraArgs).split(/\s+/).filter(Boolean));
|
|
118
119
|
|
|
119
120
|
await new Promise((resolve, reject) => {
|
|
120
121
|
let child;
|
package/src/engines/claude.js
CHANGED
|
@@ -244,6 +244,7 @@ export async function chat({ messages, system, options, images }, emit) {
|
|
|
244
244
|
}: ${imageFiles.join(', ')}`;
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
+
if (options.extraArgs) args.push(...String(options.extraArgs).split(/\s+/).filter(Boolean));
|
|
247
248
|
const run = runClaude({ prompt, args, cwd, emit });
|
|
248
249
|
if (run === null) {
|
|
249
250
|
cleanup(); // SDK fallback doesn't take images yet
|
package/src/engines/codex.js
CHANGED
|
@@ -156,6 +156,7 @@ export async function chat({ messages, system, options, images }, emit) {
|
|
|
156
156
|
args.push('-c', `mcp_servers.${name}.args=${JSON.stringify(pargs)}`);
|
|
157
157
|
}
|
|
158
158
|
if (options.model) args.push('-m', options.model);
|
|
159
|
+
if (options.extraArgs) args.push(...String(options.extraArgs).split(/\s+/).filter(Boolean));
|
|
159
160
|
for (const f of imageFiles) args.push('-i', f); // attach images to the initial prompt
|
|
160
161
|
args.push('-');
|
|
161
162
|
|
package/src/engines/custom.js
CHANGED
|
@@ -171,6 +171,10 @@ export async function runSpec(spec, { messages, system, options = {}, images },
|
|
|
171
171
|
: spec.args
|
|
172
172
|
? String(spec.args).split(/\s+/).filter(Boolean)
|
|
173
173
|
: [];
|
|
174
|
+
// User-supplied extra CLI flags (Settings → agent → "Extra arguments"), placed
|
|
175
|
+
// right after the base args/subcommand — e.g. opencode `run --format json
|
|
176
|
+
// --dangerously-skip-permissions`. Applies to every built-in & custom CLI agent.
|
|
177
|
+
if (options.extraArgs) args.push(...String(options.extraArgs).split(/\s+/).filter(Boolean));
|
|
174
178
|
// Inject the selected model via the agent's CONFIGURED model-arg template
|
|
175
179
|
// (e.g. "--model {model}" or, for opencode, "-m {model}" with provider/model).
|
|
176
180
|
// Without a template we can't know how this CLI takes a model, so options.model
|
package/src/server.js
CHANGED
|
@@ -30,7 +30,7 @@ import { callLocalMcp } from './mcp-local.js';
|
|
|
30
30
|
// Hardcoded (not read from package.json) so it survives Bun's single-file
|
|
31
31
|
// --compile, where package.json isn't on a readable FS. CI fails the publish if
|
|
32
32
|
// this drifts from package.json, so the two can't silently diverge.
|
|
33
|
-
const VERSION = '0.
|
|
33
|
+
const VERSION = '0.9.0';
|
|
34
34
|
const HOST = process.env.CHATPANEL_BRIDGE_HOST || '127.0.0.1';
|
|
35
35
|
const PORT = Number(process.env.CHATPANEL_BRIDGE_PORT) || 4319;
|
|
36
36
|
|