@tiwater/office-mcp 0.14.1 → 0.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/office/index.mjs +8 -1
- package/package.json +1 -1
package/office/index.mjs
CHANGED
|
@@ -609,7 +609,14 @@ async function fixedEdit(action, args) {
|
|
|
609
609
|
return withTempJsonFile({ operations }, async operationsPath => {
|
|
610
610
|
try {
|
|
611
611
|
const result = await runJsonCandidateChain(candidates, ['edit', input, operationsPath, output], { allowedExitCodes: [0, 1] });
|
|
612
|
-
const
|
|
612
|
+
const rawAppliedOperations = result.json?.appliedOperations ?? result.json?.AppliedOperations;
|
|
613
|
+
const appliedOperations = Array.isArray(rawAppliedOperations)
|
|
614
|
+
? rawAppliedOperations.map(operation => ({
|
|
615
|
+
type: operation.type ?? operation.Type,
|
|
616
|
+
applied: operation.applied ?? operation.Applied,
|
|
617
|
+
detail: operation.detail ?? operation.Detail,
|
|
618
|
+
}))
|
|
619
|
+
: [];
|
|
613
620
|
const observedSources = await Promise.all(sourcePaths.map(fileArtifact));
|
|
614
621
|
const sourceBindingStable = isDeepStrictEqual(sources, observedSources);
|
|
615
622
|
const pass = sourceBindingStable && appliedOperations.length === operations.length && appliedOperations.every(operation => operation.applied === true);
|