Skip to content

Commit db459a8

Browse files
committed
Update API key guide links and clean up attachment handling in AI integration
1 parent 3fd1d14 commit db459a8

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎src/addons/addons/ai-integration/_manifest_entry.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const manifest = {
66
"description": "Adds AI integration into the editor including code completion, code generation, sprite generation, background generation, and more.\n\n\nDISCLAIMER: We do not store any request data or your API keys. Your API keys are only sent with requests and remain fully stored locally on your computer. All models we use are free, ensuring no charges apply. However, for added security, we recommend setting restrictions on your API keys. If you'd like to verify this, our AI backend is open-source—feel free to check it out yourself!",
77
"info": [
88
{
9-
"text": "If you need help with creating an API key, check out our guide here: https://blog.codetorch.net/gemini-api-key-for-torchy/",
9+
"text": "If you need help with creating an API key, check out our guides here: https://blog.codetorch.net/gemini-api-key-for-torchy/ , https://blog.codetorch.net/openrouter-api-key-for-torchy/",
1010
"id": "warning"
1111
}
1212
],

‎src/addons/addons/ai-integration/helpers.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ export default class helpers {
101101
document.AI_INTEGRATION.chatHistory.push({ "role": "user", "message": messageContents });
102102
//document.AI_INTEGRATION.chatHistory.push({ "role": "assistant", "message": "Error reading response" }); //not sure if the AI needs to know that it failed
103103

104+
//clean up attachments
105+
document.AI_INTEGRATION.currentInputHasAttachment = false;
106+
if(document.getElementById('attachedFile') != null) document.getElementById('attachedFile').remove();
107+
108+
104109
document.AI_INTEGRATION.AI_currently_blabbering = false;
105110
if (document.getElementById('currentlyBlabberingOnThis') != null) {
106111
document.getElementById('currentlyBlabberingOnThis').innerHTML = "<h1 class=\"errorMessage\">Error reading response</h1>";

0 commit comments

Comments
 (0)