Skip to content

Commit

Permalink
chore: build and documentation for release
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 29, 2024
1 parent 4223529 commit 77162e2
Show file tree
Hide file tree
Showing 45 changed files with 134 additions and 92 deletions.
37 changes: 29 additions & 8 deletions dist/maidr.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ class Resources {
empty: 'Empty',
openai: 'OpenAI Vision',
gemini: 'Gemini Pro Vision',
multi: 'Multiple',
multi: 'Multiple AI',
},
},
};
Expand Down Expand Up @@ -873,9 +873,10 @@ class Menu {
*/
class ChatLLM {
constructor() {
this.firstTime = true;
this.firstMulti = true;
this.CreateComponent();
this.SetEvents();
this.firstTime = true;
}

/**
Expand Down Expand Up @@ -1060,6 +1061,8 @@ class ChatLLM {
}

let img = null;
this.firstMulti = true;

if (constants.LLMOpenAiMulti || constants.LLMModel == 'openai') {
if (firsttime) {
img = await this.ConvertSVGtoJPG(singleMaidr.id, 'openai');
Expand Down Expand Up @@ -1131,7 +1134,7 @@ class ChatLLM {
this.requestJson.messages[i].content = text;

if (data.error) {
chatLLM.DisplayChatMessage(LLMName, 'Error processing request.');
chatLLM.DisplayChatMessage(LLMName, 'Error processing request.', true);
} else {
chatLLM.DisplayChatMessage(LLMName, text);
}
Expand All @@ -1145,7 +1148,7 @@ class ChatLLM {
}
}
if (data.error) {
chatLLM.DisplayChatMessage(LLMName, 'Error processing request.');
chatLLM.DisplayChatMessage(LLMName, 'Error processing request.', true);
} else {
// todo: display actual response
}
Expand Down Expand Up @@ -1240,7 +1243,7 @@ class ChatLLM {
.catch((error) => {
chatLLM.WaitingSound(false);
console.error('Error:', error);
chatLLM.DisplayChatMessage('LLM', 'Error processing request.');
chatLLM.DisplayChatMessage(LLMName, 'Error processing request.', true);
// also todo: handle errors somehow
});
}
Expand Down Expand Up @@ -1342,15 +1345,33 @@ class ChatLLM {
* @memberof module:constants
* @returns {void}
*/
DisplayChatMessage(user = 'User', text = '') {
DisplayChatMessage(user = 'User', text = '', isSystem = false) {
let hLevel = 'h3';
if (!isSystem && constants.LLMModel == 'multi' && user != 'User') {
if (this.firstMulti) {
let multiAIName = resources.GetString('multi');
let titleHtml = `
<div class="chatLLM_message chatLLM_message_other">
<h3 class="chatLLM_message_user">${multiAIName} Responses</h3>
</div>
`;
this.RenderChatMessage(titleHtml);
this.firstMulti = false;
}
hLevel = 'h4';
}
let html = `
<div class="chatLLM_message ${
user == 'User' ? 'chatLLM_message_self' : 'chatLLM_message_other'
}">
<h3 class="chatLLM_message_user">${user}</h3>
<${hLevel} class="chatLLM_message_user">${user}</${hLevel}>
<p class="chatLLM_message_text">${text}</p>
</div>
`;

this.RenderChatMessage(html);
}
RenderChatMessage(html) {
document
.getElementById('chatLLM_chat_history')
.insertAdjacentHTML('beforeend', html);
Expand Down Expand Up @@ -1424,7 +1445,7 @@ class ChatLLM {
// get name from resource
let LLMName = resources.GetString(constants.LLMModel);
this.firstTime = false;
this.DisplayChatMessage(LLMName, 'Processing Chart...');
this.DisplayChatMessage(LLMName, 'Processing Chart...', true);
let defaultPrompt = this.GetDefaultPrompt();
this.Submit(defaultPrompt, true);
}
Expand Down
2 changes: 1 addition & 1 deletion dist/maidr.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Audio.html
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,7 @@ <h4 class="name" id="playTone"><span class="type-signature"></span>playTone<span
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 00:14:10 GMT+0000 (Coordinated Universal Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Thu Feb 29 2024 00:13:48 GMT+0000 (Coordinated Universal Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/BarChart.html
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ <h4 class="name" id="UnSelectPrevious"><span class="type-signature"></span>UnSel
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 00:14:10 GMT+0000 (Coordinated Universal Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Thu Feb 29 2024 00:13:48 GMT+0000 (Coordinated Universal Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/BoxPlot.html
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 00:14:10 GMT+0000 (Coordinated Universal Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Thu Feb 29 2024 00:13:48 GMT+0000 (Coordinated Universal Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/BoxplotRect.html
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ <h4 class="name" id="UpdateRect"><span class="type-signature"></span>UpdateRect<
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 00:14:10 GMT+0000 (Coordinated Universal Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Thu Feb 29 2024 00:13:48 GMT+0000 (Coordinated Universal Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
18 changes: 9 additions & 9 deletions docs/ChatLLM.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ <h4 class="name" id="ConvertSVGtoJPG"><span class="type-signature">(async) </spa

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1444">line 1444</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1465">line 1465</a>
</li></ul></dd>


Expand Down Expand Up @@ -285,7 +285,7 @@ <h4 class="name" id="CreateComponent"><span class="type-signature"></span>Create

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line885">line 885</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line886">line 886</a>
</li></ul></dd>


Expand Down Expand Up @@ -370,7 +370,7 @@ <h4 class="name" id="GetDefaultPrompt"><span class="type-signature"></span>GetDe

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1491">line 1491</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1512">line 1512</a>
</li></ul></dd>


Expand Down Expand Up @@ -453,7 +453,7 @@ <h4 class="name" id="ProcessLLMResponse"><span class="type-signature"></span>Pro

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1120">line 1120</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1123">line 1123</a>
</li></ul></dd>


Expand Down Expand Up @@ -557,7 +557,7 @@ <h4 class="name" id="ResetChatHistory"><span class="type-signature"></span>Reset

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1367">line 1367</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1388">line 1388</a>
</li></ul></dd>


Expand Down Expand Up @@ -640,7 +640,7 @@ <h4 class="name" id="SetEvents"><span class="type-signature"></span>SetEvents<sp

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line931">line 931</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line932">line 932</a>
</li></ul></dd>


Expand Down Expand Up @@ -723,7 +723,7 @@ <h4 class="name" id="Toggle"><span class="type-signature"></span>Toggle<span cla

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1404">line 1404</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1425">line 1425</a>
</li></ul></dd>


Expand Down Expand Up @@ -878,7 +878,7 @@ <h4 class="name" id="fakeLLMResponseData"><span class="type-signature"></span>fa

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1160">line 1160</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1163">line 1163</a>
</li></ul></dd>


Expand Down Expand Up @@ -951,7 +951,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 00:14:10 GMT+0000 (Coordinated Universal Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Thu Feb 29 2024 00:13:48 GMT+0000 (Coordinated Universal Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Constants.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ <h3 class="subsection-title">Classes</h3>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 00:14:10 GMT+0000 (Coordinated Universal Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Thu Feb 29 2024 00:13:48 GMT+0000 (Coordinated Universal Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Constants_ConvertHexToRGBString.html
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 00:14:10 GMT+0000 (Coordinated Universal Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Thu Feb 29 2024 00:13:48 GMT+0000 (Coordinated Universal Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Constants_ConvertRGBStringToHex.html
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 00:14:10 GMT+0000 (Coordinated Universal Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Thu Feb 29 2024 00:13:48 GMT+0000 (Coordinated Universal Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Constants_GetStyleArrayFromString.html
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 00:14:10 GMT+0000 (Coordinated Universal Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Thu Feb 29 2024 00:13:48 GMT+0000 (Coordinated Universal Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Constants_GetStyleStringFromArray.html
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 00:14:10 GMT+0000 (Coordinated Universal Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Thu Feb 29 2024 00:13:48 GMT+0000 (Coordinated Universal Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Control.html
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 00:14:10 GMT+0000 (Coordinated Universal Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Thu Feb 29 2024 00:13:48 GMT+0000 (Coordinated Universal Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
12 changes: 6 additions & 6 deletions docs/Description.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ <h4 class="name" id="Description"><span class="type-signature"></span>new Descri

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1521">line 1521</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1542">line 1542</a>
</li></ul></dd>


Expand Down Expand Up @@ -200,7 +200,7 @@ <h4 class="name" id="CreateComponent"><span class="type-signature"></span>Create

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1536">line 1536</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1557">line 1557</a>
</li></ul></dd>


Expand Down Expand Up @@ -283,7 +283,7 @@ <h4 class="name" id="Destroy"><span class="type-signature"></span>Destroy<span c

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1606">line 1606</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1627">line 1627</a>
</li></ul></dd>


Expand Down Expand Up @@ -366,7 +366,7 @@ <h4 class="name" id="PopulateData"><span class="type-signature"></span>PopulateD

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1650">line 1650</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1671">line 1671</a>
</li></ul></dd>


Expand Down Expand Up @@ -449,7 +449,7 @@ <h4 class="name" id="Toggle"><span class="type-signature"></span>Toggle<span cla

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1622">line 1622</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1643">line 1643</a>
</li></ul></dd>


Expand Down Expand Up @@ -573,7 +573,7 @@ <h5>Parameters:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 00:14:10 GMT+0000 (Coordinated Universal Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Thu Feb 29 2024 00:13:48 GMT+0000 (Coordinated Universal Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Display.html
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ <h4 class="name" id="toggleTextMode"><span class="type-signature"></span>toggleT
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 00:14:10 GMT+0000 (Coordinated Universal Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Thu Feb 29 2024 00:13:48 GMT+0000 (Coordinated Universal Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/HeatMap.html
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,7 @@ <h4 class="name" id="updateConstants"><span class="type-signature"></span>update
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 00:14:10 GMT+0000 (Coordinated Universal Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Thu Feb 29 2024 00:13:48 GMT+0000 (Coordinated Universal Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/HeatMapRect.html
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ <h4 class="name" id="UpdateRect"><span class="type-signature"></span>UpdateRect<
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 00:14:10 GMT+0000 (Coordinated Universal Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Thu Feb 29 2024 00:13:48 GMT+0000 (Coordinated Universal Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
6 changes: 3 additions & 3 deletions docs/Helper.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ <h4 class="name" id="Helper"><span class="type-signature"></span>new Helper<span

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1796">line 1796</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1817">line 1817</a>
</li></ul></dd>


Expand Down Expand Up @@ -200,7 +200,7 @@ <h4 class="name" id=".containsObject"><span class="type-signature">(static) </sp

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1803">line 1803</a>
<a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line1824">line 1824</a>
</li></ul></dd>


Expand Down Expand Up @@ -355,7 +355,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 00:14:10 GMT+0000 (Coordinated Universal Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Thu Feb 29 2024 00:13:48 GMT+0000 (Coordinated Universal Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Histogram.html
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ <h4 class="name" id="SetMaxMin"><span class="type-signature"></span>SetMaxMin<sp
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 00:14:10 GMT+0000 (Coordinated Universal Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Thu Feb 29 2024 00:13:48 GMT+0000 (Coordinated Universal Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Layer0Point.html
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Wed Feb 28 2024 00:14:10 GMT+0000 (Coordinated Universal Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Thu Feb 29 2024 00:13:48 GMT+0000 (Coordinated Universal Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
Loading

0 comments on commit 77162e2

Please sign in to comment.