Multi-agent audit + aggressive cleanup across server/web/coder/booterm, delivered behind a DEFER discipline so none of the in-flight files were touched. Removes dead code/deps/columns, dedups server + coder helpers, and splits the oversized modules (tools.ts, opencode-server.ts, sentinel-summaries, turn.ts, TerminalPane.tsx) behind stable contracts. Adds 78 parity/unit tests (server 587, coder 323); fixes two latent bugs (ChatPane queue keys, FileViewerOverlay blank-line parity). Intended tag: v2.7.12-audit-cleanup.
10 lines
413 B
TypeScript
10 lines
413 B
TypeScript
// Strips a matching pair of leading/trailing single or double quotes from a
|
|
// YAML value string produced by the minimal frontmatter parsers in agents.ts
|
|
// and skills.ts. Returns the string unchanged when no matching pair is found.
|
|
export function stripQuotes(s: string): string {
|
|
if (s.length >= 2 && (s[0] === '"' || s[0] === "'") && s[0] === s[s.length - 1]) {
|
|
return s.slice(1, -1);
|
|
}
|
|
return s;
|
|
}
|