Loading files
dd36ae3b4This file is pinned to the selected release. Download the original to open it in your design tool.
Files from this revision, including CAD and LFS contents. Git history is not included.
Or in GitHub Desktop, choose File → Clone repository → URL and paste this address.
Public repositories can be cloned without signing in. For pushing, use your ThingAtlas username and a Git access token as the password.
git lfs install git clone https://thingatlas.com/git/-unclaimed/openharness-1322671404.git
Includes Git history, branches, and Git LFS files. Clones the repository’s default branch, regardless of the version shown here.
/** Grok's idle footer: `Grok 4.5 (medium) · always-approve`. */
export function parseGrokFooterProfile(capture: string): { model: string; effort: string } | null {
const lines = capture.replace(/\u001b\[[0-9;:]*[A-Za-z]/g, '').split('\n')
for (let i = lines.length - 1; i >= 0; i--) {
const match = /\b(Grok\s+[0-9][A-Za-z0-9 ._-]*)\s+\((low|medium|high|xhigh)\)\s*[·|]/i.exec(lines[i])
if (!match) continue
return {
model: match[1].trim().toLowerCase().replace(/\s+/g, '-'),
effort: match[2].toLowerCase(),
}
}
return null
}
/** `grok models` rows: ` * grok-4.5 (default)`. */
export function parseGrokModelsOutput(output: string): string[] {
const models: string[] = []
const seen = new Set<string>()
for (const line of output.split('\n')) {
const model = /^\s*\*\s+([^\s]+)(?:\s+\(default\))?\s*$/.exec(line)?.[1]
if (!model || seen.has(model)) continue
seen.add(model)
models.push(model)
}
return models
}
dd36ae3b4This file is pinned to the selected release. Download the original to open it in your design tool.