feat(coding-agent): emit session header in json print mode (#679)
Also mark sandbox extension ctx param as intentionally unused.
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
- `/scoped-models`: Alt+Up/Down to reorder enabled models. Order is preserved when saving with Ctrl+S and determines Ctrl+P cycling order. ([#676](https://github.com/badlogic/pi-mono/pull/676) by [@thomasmhr](https://github.com/thomasmhr))
|
- `/scoped-models`: Alt+Up/Down to reorder enabled models. Order is preserved when saving with Ctrl+S and determines Ctrl+P cycling order. ([#676](https://github.com/badlogic/pi-mono/pull/676) by [@thomasmhr](https://github.com/thomasmhr))
|
||||||
- Amazon Bedrock provider support (experimental, tested with Anthropic Claude models only) ([#494](https://github.com/badlogic/pi-mono/pull/494) by [@unexge](https://github.com/unexge))
|
- Amazon Bedrock provider support (experimental, tested with Anthropic Claude models only) ([#494](https://github.com/badlogic/pi-mono/pull/494) by [@unexge](https://github.com/unexge))
|
||||||
- Extension example: `sandbox/` for OS-level bash sandboxing using `@anthropic-ai/sandbox-runtime` with per-project config ([#673](https://github.com/badlogic/pi-mono/pull/673) by [@dannote](https://github.com/dannote))
|
- Extension example: `sandbox/` for OS-level bash sandboxing using `@anthropic-ai/sandbox-runtime` with per-project config ([#673](https://github.com/badlogic/pi-mono/pull/673) by [@dannote](https://github.com/dannote))
|
||||||
|
- Print mode JSON output now emits the session header as the first line.
|
||||||
|
|
||||||
## [0.44.0] - 2026-01-12
|
## [0.44.0] - 2026-01-12
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,12 @@ export interface PrintModeOptions {
|
|||||||
*/
|
*/
|
||||||
export async function runPrintMode(session: AgentSession, options: PrintModeOptions): Promise<void> {
|
export async function runPrintMode(session: AgentSession, options: PrintModeOptions): Promise<void> {
|
||||||
const { mode, messages = [], initialMessage, initialImages } = options;
|
const { mode, messages = [], initialMessage, initialImages } = options;
|
||||||
|
if (mode === "json") {
|
||||||
|
const header = session.sessionManager.getHeader();
|
||||||
|
if (header) {
|
||||||
|
console.log(JSON.stringify(header));
|
||||||
|
}
|
||||||
|
}
|
||||||
// Set up extensions for print mode (no UI, no command context)
|
// Set up extensions for print mode (no UI, no command context)
|
||||||
const extensionRunner = session.extensionRunner;
|
const extensionRunner = session.extensionRunner;
|
||||||
if (extensionRunner) {
|
if (extensionRunner) {
|
||||||
|
|||||||
Reference in New Issue
Block a user