fix(matrix): scope progress tool status config

This commit is contained in:
Vincent Koc
2026-05-03 20:57:08 -07:00
parent 12af95a55e
commit 02b9dbde39
3 changed files with 7 additions and 1 deletions

View File

@@ -483,6 +483,8 @@ describe("monitorMatrixProvider", () => {
[{ mode: "progress" }, "progress", true],
[{ mode: "partial", preview: { toolProgress: false } }, "partial", false],
[{ mode: "quiet", preview: { toolProgress: false } }, "quiet", false],
[{ mode: "partial", progress: { toolProgress: false } }, "partial", true],
[{ mode: "quiet", progress: { toolProgress: false } }, "quiet", true],
[{ mode: "progress", progress: { toolProgress: false } }, "progress", false],
[
{ mode: "progress", progress: { toolProgress: false }, preview: { toolProgress: true } },

View File

@@ -98,7 +98,10 @@ function resolveMatrixPreviewToolProgress(streaming: MatrixConfig["streaming"]):
if (!isMatrixStreamingConfig(streaming)) {
return true;
}
return streaming.progress?.toolProgress ?? streaming.preview?.toolProgress ?? true;
if (resolveMatrixStreamingMode(streaming) === "progress") {
return streaming.progress?.toolProgress ?? streaming.preview?.toolProgress ?? true;
}
return streaming.preview?.toolProgress ?? true;
}
function resolveMatrixPreviewToolProgressEnabled(streaming: MatrixConfig["streaming"]): boolean {