Skip to content

Commit

Permalink
Missing Header added
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiGa committed Jan 27, 2025
1 parent 90bccfe commit 4f539f9
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 7 deletions.
2 changes: 1 addition & 1 deletion amd/build/ai_manager.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/build/dialog.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion amd/build/dialog.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion amd/build/helper.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/build/webservices.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions amd/src/ai_manager.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

import {makeRequest} from 'local_ai_manager/make_request';

/**
Expand Down
20 changes: 18 additions & 2 deletions amd/src/dialog.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

import Modal from 'core/modal';
import * as externalServices from 'block_ai_chat/webservices';
import Templates from 'core/templates';
Expand All @@ -12,7 +27,6 @@ import {renderUserQuota} from 'local_ai_manager/userquota';
import {getAiConfig} from 'local_ai_manager/config';
import LocalStorage from 'core/localstorage';
import {escapeHTML, hash} from './helper';
import Config from 'core/config';

// Declare variables.
const VIEW_CHATWINDOW = 'block_ai_chat_chatwindow';
Expand Down Expand Up @@ -388,7 +402,9 @@ const enterQuestion = async(question) => {
aiAtWork = false;

// Save new question and answer.
saveConversationLocally(question, requestresult.result);
if (requestresult.code == 200) {
saveConversationLocally(question, requestresult.result);
}

// Update userquota.
const userquota = document.getElementById('block_ai_chat_userquota');
Expand Down
15 changes: 15 additions & 0 deletions amd/src/helper.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Copy ai reply to clipboard.
* @param {*} element
Expand Down
15 changes: 15 additions & 0 deletions amd/src/webservices.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

import {call as fetchMany} from 'core/ajax';

/**
Expand Down

0 comments on commit 4f539f9

Please sign in to comment.