fix(models): store cache in agent directory

Resolve the Command Code model cache through the host's getAgentDir helper so pi, OMP, and PI_CODING_AGENT_DIR use their own agent state directory instead of the official Command Code client directory.
This commit is contained in:
Patrick Wozniak
2026-08-02 01:37:34 +02:00
parent 070ef3c07a
commit b1a60da6b4
5 changed files with 17 additions and 15 deletions
+3
View File
@@ -166,6 +166,9 @@ try {
assert.match(listOutput, /commandcode/)
assert.match(listOutput, /deepseek\/deepseek-v4-flash/)
assert.equal(modelListRequestCount, 1)
assert.doesNotThrow(() =>
accessSync(join(tempHome, ".omp", "agent", "commandcode-models.json"), constants.R_OK),
)
assert.doesNotMatch(result.stdout + result.stderr, /Failed to load extension/)
console.log("[omp-compat] print mode through real extension and mock API")