Skip to content

Commit 4ee3d94

Browse files
authored
fix: add log by using Log() function (#411)
* fix: add log by using Log() function * fix: add log by using Log() function * fix comments
1 parent 86b598e commit 4ee3d94

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

example/src/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,6 +1074,7 @@ here to see if it gets cut off properly as expected, with an ellipsis through cs
10741074
// Return true to allow the context item to be inserted
10751075
// The original context item will be replaced with our file context item
10761076
mynahUI.addCustomContextToPrompt(selectedTab, [contextItem], insertPosition)
1077+
Log(`Image context added by typing '@image:': <b>${contextItem.command}</b>`);
10771078
return true;
10781079
}
10791080

@@ -1112,6 +1113,7 @@ here to see if it gets cut off properly as expected, with an ellipsis through cs
11121113
};
11131114

11141115
mynahUI.addCustomContextToPrompt(tabId, [contextItem])
1116+
Log(`Image context added by selecting Image from context menu: <b>${contextItem.command}</b>`);
11151117
// avoid insert of context
11161118
return false;
11171119
}
@@ -1330,6 +1332,7 @@ here to see if it gets cut off properly as expected, with an ellipsis through cs
13301332
}
13311333
}
13321334
mynahUI.addCustomContextToPrompt(tabId, commands, insertPosition);
1335+
Log(`Images dropped: ${commands.map(cmd => `<br/>- <b>${cmd.command}</b>`).join('')}`);
13331336
},
13341337
onInBodyButtonClicked: (tabId: string, messageId: string, action) => {
13351338
if (action.id === 'allow-readonly-tools') {

0 commit comments

Comments
 (0)