SimpleChatTC:UI:ClearChat, Unicode icons for Clear, settings
Allow user to clear the existing chat. The user does have the option to load the just cleared chat, if required. Add icons wrt clearing chat and settings.
This commit is contained in:
parent
2394d38d58
commit
0fcb13257c
|
|
@ -24,7 +24,10 @@
|
|||
|
||||
<div class="sameline" id="heading">
|
||||
<p class="heading flex-grow" > <b> SimpleChat </b> </p>
|
||||
<button id="settings">Settings</button>
|
||||
<div>
|
||||
<button id="clearchat">🧹 ClearChat</button>
|
||||
<button id="settings">⚙ Settings</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="sessions-div" class="sameline"></div>
|
||||
|
|
|
|||
|
|
@ -182,11 +182,14 @@ Once inside
|
|||
not get/see a tool call, in such situations, dont forget to cross check that tool calling is
|
||||
enabled in the settings.
|
||||
|
||||
* just refresh the page, to reset wrt the chat history and or system prompt and start afresh.
|
||||
This also helps if you had forgotten to start the bundled simpleproxy.py server before hand.
|
||||
* ClearChat/Refresh
|
||||
* use the clearchat button to clear the currently active chat session.
|
||||
* just refresh the page, to reset wrt the chat history and system prompts across chat sessions
|
||||
and start afresh.
|
||||
* This also helps if you had forgotten to start the bundled simpleproxy.py server before hand.
|
||||
Start the simpleproxy.py server and refresh the client ui page, to get access to web access
|
||||
related tool calls.
|
||||
* if you refreshed unknowingly, you can use the Restore feature to try load the previous chat
|
||||
* if you refreshed/cleared unknowingly, you can use the Restore feature to try load previous chat
|
||||
session and resume that session. This uses a basic local auto save logic that is in there.
|
||||
|
||||
* Using NewChat one can start independent chat sessions.
|
||||
|
|
@ -434,7 +437,8 @@ The following tools/functions are currently provided by default
|
|||
|
||||
* simple_calculator - which can solve simple arithmatic expressions
|
||||
|
||||
* run_javascript_function_code - which can be used to run ai generated or otherwise javascript code using browser's js capabilities.
|
||||
* run_javascript_function_code - which can be used to run ai generated or otherwise javascript code
|
||||
using browser's js capabilities.
|
||||
|
||||
* data_store_get/set/delete/list - allows for a basic data store to be used.
|
||||
|
||||
|
|
@ -620,6 +624,8 @@ channel of the handshake.
|
|||
having ai responses built over multiple steps of tool callings etal. So independent of our client side
|
||||
sliding window based drop off or even before they kick in, this can help in many cases.
|
||||
|
||||
* UI - add ClearChat button and logic. Also add unicode icons for same as well as for Settings.
|
||||
|
||||
|
||||
#### ToDo
|
||||
|
||||
|
|
|
|||
|
|
@ -326,6 +326,7 @@ class SimpleChat {
|
|||
clear() {
|
||||
this.xchat = [];
|
||||
this.iLastSys = -1;
|
||||
this.latestResponse = new ChatMessageEx();
|
||||
}
|
||||
|
||||
ods_key() {
|
||||
|
|
@ -797,6 +798,7 @@ class MultiChatUI {
|
|||
this.elDivHeading = /** @type{HTMLSelectElement} */(document.getElementById("heading"));
|
||||
this.elDivSessions = /** @type{HTMLDivElement} */(document.getElementById("sessions-div"));
|
||||
this.elBtnSettings = /** @type{HTMLButtonElement} */(document.getElementById("settings"));
|
||||
this.elBtnClearChat = /** @type{HTMLButtonElement} */(document.getElementById("clearchat"));
|
||||
this.elDivTool = /** @type{HTMLDivElement} */(document.getElementById("tool-div"));
|
||||
this.elBtnTool = /** @type{HTMLButtonElement} */(document.getElementById("tool-btn"));
|
||||
this.elInToolName = /** @type{HTMLInputElement} */(document.getElementById("toolname-in"));
|
||||
|
|
@ -1030,6 +1032,10 @@ class MultiChatUI {
|
|||
this.elDivChat.replaceChildren();
|
||||
gMe.show_settings(this.elDivChat);
|
||||
});
|
||||
this.elBtnClearChat.addEventListener("click", (ev)=>{
|
||||
this.simpleChats[this.curChatId].clear()
|
||||
this.chat_show(this.curChatId)
|
||||
});
|
||||
|
||||
this.elBtnUser.addEventListener("click", (ev)=>{
|
||||
clearTimeout(this.timers.toolcallResponseSubmitClick)
|
||||
|
|
|
|||
Loading…
Reference in New Issue