refactor: codebase audit cleanup — dead code, dedup, module splits
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.
This commit is contained in:
9
apps/server/src/utils/string-utils.ts
Normal file
9
apps/server/src/utils/string-utils.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
// 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;
|
||||
}
|
||||
Reference in New Issue
Block a user