mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
* feat(config): support layered OpenCode config sources with revision-guarded saves * refactor(config): harden multi-source OpenCode config handling - extract shared config-source helpers and default source name - reject shadowed removals with 409 and require sources/revision - restart the server on reload with session resume - mirror multiple host config files on import and warn on removals - skip restart for mcp-only saves - drop removedFields and CONFIG_PATCH_TIMEOUT_MS * fix(config): return null when archiving broken OpenCode config fails
10 lines
490 B
TypeScript
10 lines
490 B
TypeScript
export { parseJsonc, parseJsoncErrorLine } from '@opencode-manager/shared/utils'
|
|
import { findJsoncLineForPath, parseJsoncPathSegments } from '@opencode-manager/shared/utils'
|
|
|
|
export function resolveJsoncIssueLine(content: string, path: PropertyKey[] | string): number | null {
|
|
const segments = Array.isArray(path)
|
|
? path.map((segment) => (typeof segment === 'number' ? segment : String(segment)))
|
|
: parseJsoncPathSegments(path)
|
|
return findJsoncLineForPath(content, segments)
|
|
}
|