Skip to content

Commit b22153f

Browse files
committed
fix(ai): use CMD_ADD_TO_WORKINGSET_AND_OPEN for controlEditor open and add [AI Control] log prefix
CMD_OPEN didn't reliably pin files to the working set, causing the AI's open-file tool to report success while the file wasn't actually visible.
1 parent 60b7c5d commit b22153f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/core-ai/aiPhoenixConnectors.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,18 +618,18 @@ define(function (require, exports, module) {
618618
function controlEditor(params) {
619619
const deferred = new $.Deferred();
620620
const vfsPath = SnapshotStore.realToVfsPath(params.filePath);
621-
console.log("controlEditor:", params.operation, params.filePath, "-> vfs:", vfsPath);
621+
console.log("[AI Control] controlEditor:", params.operation, params.filePath, "-> vfs:", vfsPath);
622622

623623
function _resolve(result) {
624624
if (!result.success) {
625-
console.error("controlEditor failed:", params.operation, vfsPath, result.error);
625+
console.error("[AI Control] controlEditor failed:", params.operation, vfsPath, result.error);
626626
}
627627
deferred.resolve(result);
628628
}
629629

630630
switch (params.operation) {
631631
case "open":
632-
CommandManager.execute(Commands.CMD_OPEN, { fullPath: vfsPath })
632+
CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, { fullPath: vfsPath })
633633
.done(function () { _resolve({ success: true }); })
634634
.fail(function (err) { _resolve({ success: false, error: String(err) }); });
635635
break;

0 commit comments

Comments
 (0)