mirror of
https://github.com/larsbaunwall/vscode-copilot-bridge.git
synced 2025-10-05 22:22:59 +00:00
- Implements VS Code extension per AGENTS.md specification
- OpenAI-style HTTP facade: POST /v1/chat/completions (SSE), GET /v1/models, GET /healthz
- JSON-RPC WebSocket server with methods: mcp.fs.read/list, mcp.search.code, mcp.symbols.list, mcp.edit.applyPatch, mcp.format.apply, mcp.imports.organize
- Copilot Chat integration via vscode.chat.requestChatAccess('copilot')
- Commands: bridge.enable/disable/status with status bar indicator
- Security: localhost-only binding, optional bearer token, read-only by default
- Policy enforcement via optional .agent-policy.yaml
- Ephemeral port management with globalState persistence
Co-Authored-By: Lars Baunwall <larslb@thinkability.dk>
34 lines
1.2 KiB
TypeScript
34 lines
1.2 KiB
TypeScript
export declare const FOLD_FLOW = "flow";
|
|
export declare const FOLD_BLOCK = "block";
|
|
export declare const FOLD_QUOTED = "quoted";
|
|
/**
|
|
* `'block'` prevents more-indented lines from being folded;
|
|
* `'quoted'` allows for `\` escapes, including escaped newlines
|
|
*/
|
|
export type FoldMode = 'flow' | 'block' | 'quoted';
|
|
export interface FoldOptions {
|
|
/**
|
|
* Accounts for leading contents on the first line, defaulting to
|
|
* `indent.length`
|
|
*/
|
|
indentAtStart?: number;
|
|
/** Default: `80` */
|
|
lineWidth?: number;
|
|
/**
|
|
* Allow highly indented lines to stretch the line width or indent content
|
|
* from the start.
|
|
*
|
|
* Default: `20`
|
|
*/
|
|
minContentWidth?: number;
|
|
/** Called once if the text is folded */
|
|
onFold?: () => void;
|
|
/** Called once if any line of text exceeds lineWidth characters */
|
|
onOverflow?: () => void;
|
|
}
|
|
/**
|
|
* Tries to keep input at up to `lineWidth` characters, splitting only on spaces
|
|
* not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are
|
|
* terminated with `\n` and started with `indent`.
|
|
*/
|
|
export declare function foldFlowLines(text: string, indent: string, mode?: FoldMode, { indentAtStart, lineWidth, minContentWidth, onFold, onOverflow }?: FoldOptions): string;
|