New model selector design + moved around the delete chat option on menus
This commit is contained in:
parent
7fbc9b9bde
commit
c02e6a565e
@ -15,6 +15,9 @@
|
|||||||
.model_list_box {
|
.model_list_box {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
.manage_models_button {
|
||||||
|
padding: 6px 8px 6px 8px;
|
||||||
|
}
|
||||||
.model_list_box > * {
|
.model_list_box > * {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
@ -1287,6 +1287,7 @@ Generate a title following these rules:
|
|||||||
self.chats["order"] = []
|
self.chats["order"] = []
|
||||||
for chat_name in self.chats["chats"].keys():
|
for chat_name in self.chats["chats"].keys():
|
||||||
self.chats["order"].append(chat_name)
|
self.chats["order"].append(chat_name)
|
||||||
|
self.model_list_box.select_row(self.model_list_box.get_row_at_index(0))
|
||||||
if len(self.chats["chats"][self.chats["selected_chat"]]["messages"].keys()) > 0:
|
if len(self.chats["chats"][self.chats["selected_chat"]]["messages"].keys()) > 0:
|
||||||
last_model_used = self.chats["chats"][self.chats["selected_chat"]]["messages"][list(self.chats["chats"][self.chats["selected_chat"]]["messages"].keys())[-1]]["model"]
|
last_model_used = self.chats["chats"][self.chats["selected_chat"]]["messages"][list(self.chats["chats"][self.chats["selected_chat"]]["messages"].keys())[-1]]["model"]
|
||||||
for i, m in enumerate(self.local_models):
|
for i, m in enumerate(self.local_models):
|
||||||
@ -1382,6 +1383,7 @@ Generate a title following these rules:
|
|||||||
menu_model=self.chat_right_click_menu,
|
menu_model=self.chat_right_click_menu,
|
||||||
has_arrow=False,
|
has_arrow=False,
|
||||||
halign=1,
|
halign=1,
|
||||||
|
height_request=125
|
||||||
)
|
)
|
||||||
self.selected_chat_row = chat_row
|
self.selected_chat_row = chat_row
|
||||||
position = Gdk.Rectangle()
|
position = Gdk.Rectangle()
|
||||||
|
@ -99,25 +99,38 @@
|
|||||||
</style>
|
</style>
|
||||||
<property name="popover">
|
<property name="popover">
|
||||||
<object class="GtkPopover" id="model_popover">
|
<object class="GtkPopover" id="model_popover">
|
||||||
|
<property name="has-arrow">false</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<object class="GtkBox">
|
||||||
<property name="orientation">1</property>
|
<property name="orientation">1</property>
|
||||||
<property name="spacing">10</property>
|
<property name="spacing">5</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton">
|
<object class="GtkButton">
|
||||||
<property name="hexpand">true</property>
|
<property name="child">
|
||||||
|
<object class="GtkLabel">
|
||||||
<property name="label" translatable="yes">Manage Models</property>
|
<property name="label" translatable="yes">Manage Models</property>
|
||||||
|
<property name="justify">left</property>
|
||||||
|
<property name="halign">1</property>
|
||||||
|
</object>
|
||||||
|
</property>
|
||||||
|
<property name="hexpand">true</property>
|
||||||
<property name="tooltip-text" translatable="yes">Manage Models</property>
|
<property name="tooltip-text" translatable="yes">Manage Models</property>
|
||||||
<property name="action-name">app.manage_models</property>
|
<property name="action-name">app.manage_models</property>
|
||||||
<signal name="clicked" handler="close_model_popup"/>
|
<signal name="clicked" handler="close_model_popup"/>
|
||||||
<style>
|
<style>
|
||||||
<class name="accent"/>
|
<class name="flat"/>
|
||||||
|
<class name="manage_models_button"/>
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkSeparator"/>
|
<object class="GtkSeparator"/>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow">
|
||||||
|
<property name="max-content-height">300</property>
|
||||||
|
<property name="propagate-natural-width">true</property>
|
||||||
|
<property name="propagate-natural-height">true</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBox" id="model_list_box">
|
<object class="GtkListBox" id="model_list_box">
|
||||||
<property name="hexpand">true</property>
|
<property name="hexpand">true</property>
|
||||||
@ -130,6 +143,9 @@
|
|||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</property>
|
||||||
</object>
|
</object>
|
||||||
@ -1105,10 +1121,7 @@ By downloading any model you accept their license agreement available on the mod
|
|||||||
</section>
|
</section>
|
||||||
</menu>
|
</menu>
|
||||||
<menu id="secondary_menu">
|
<menu id="secondary_menu">
|
||||||
<item>
|
<section>
|
||||||
<attribute name="label" translatable="yes">Delete Chat</attribute>
|
|
||||||
<attribute name="action">app.delete_current_chat</attribute>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<attribute name="label" translatable="yes">Rename Chat</attribute>
|
<attribute name="label" translatable="yes">Rename Chat</attribute>
|
||||||
<attribute name="action">app.rename_current_chat</attribute>
|
<attribute name="action">app.rename_current_chat</attribute>
|
||||||
@ -1121,13 +1134,16 @@ By downloading any model you accept their license agreement available on the mod
|
|||||||
<attribute name="label" translatable="yes">Clear Chat</attribute>
|
<attribute name="label" translatable="yes">Clear Chat</attribute>
|
||||||
<attribute name="action">app.clear</attribute>
|
<attribute name="action">app.clear</attribute>
|
||||||
</item>
|
</item>
|
||||||
</menu>
|
</section>
|
||||||
<menu id="chat_right_click_menu">
|
|
||||||
<section>
|
<section>
|
||||||
<item>
|
<item>
|
||||||
<attribute name="label" translatable="yes">Delete Chat</attribute>
|
<attribute name="label" translatable="yes">Delete Chat</attribute>
|
||||||
<attribute name="action">app.delete_chat</attribute>
|
<attribute name="action">app.delete_current_chat</attribute>
|
||||||
</item>
|
</item>
|
||||||
|
</section>
|
||||||
|
</menu>
|
||||||
|
<menu id="chat_right_click_menu">
|
||||||
|
<section>
|
||||||
<item>
|
<item>
|
||||||
<attribute name="label" translatable="yes">Rename Chat</attribute>
|
<attribute name="label" translatable="yes">Rename Chat</attribute>
|
||||||
<attribute name="action">app.rename_chat</attribute>
|
<attribute name="action">app.rename_chat</attribute>
|
||||||
@ -1137,6 +1153,12 @@ By downloading any model you accept their license agreement available on the mod
|
|||||||
<attribute name="action">app.export_chat</attribute>
|
<attribute name="action">app.export_chat</attribute>
|
||||||
</item>
|
</item>
|
||||||
</section>
|
</section>
|
||||||
|
<section>
|
||||||
|
<item>
|
||||||
|
<attribute name="label" translatable="yes">Delete Chat</attribute>
|
||||||
|
<attribute name="action">app.delete_chat</attribute>
|
||||||
|
</item>
|
||||||
|
</section>
|
||||||
</menu>
|
</menu>
|
||||||
<menu id="create_model_menu">
|
<menu id="create_model_menu">
|
||||||
<section>
|
<section>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user