Skip to content

Commit 9debf3f

Browse files
committed
0.3.0
1 parent 7a21e5a commit 9debf3f

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

src/gui/pages/settings.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,37 @@ def reset_application(self):
282282
}
283283
}
284284

285+
app_settings = {
286+
"display.bubble_avatar_position": "Top",
287+
"display.bubble_spacing": 7,
288+
"display.primary_color": "#ff11121b",
289+
"display.secondary_color": "#ff222332",
290+
"display.show_bubble_avatar": "In Group",
291+
"display.show_bubble_name": "In Group",
292+
"display.show_waiting_bar": "In Group",
293+
"display.text_color": "#ffb0bbd5",
294+
"display.text_font": "",
295+
"display.text_size": 15,
296+
"display.window_margin": 6,
297+
"system.always_on_top": True,
298+
"system.auto_completion": False,
299+
"system.auto_title": True,
300+
"system.auto_title_model": "gpt-3.5-turbo",
301+
"system.auto_title_prompt": "Write only a brief and concise title for a chat that begins with the following message:\n\n```{user_msg}```",
302+
"system.dev_mode": False,
303+
"system.language": "English",
304+
"system.telemetry": True,
305+
"system.voice_input_method": "None"
306+
}
307+
285308
sql.execute('DELETE FROM contexts_messages')
286309
sql.execute('DELETE FROM contexts')
287310
sql.execute('DELETE FROM logs')
311+
312+
sql.execute("UPDATE settings SET value = '' WHERE field = 'my_uuid'")
313+
sql.execute("UPDATE settings SET value = '0' WHERE field = 'accepted_tos'")
314+
sql.execute("UPDATE settings SET value = ? WHERE field = 'app_config'", (json.dumps(app_settings),))
315+
288316
sql.execute('VACUUM')
289317
# # self.parent.update_config('system.dev_mode', False)
290318
# # self.toggle_dev_mode(False)

src/utils/sql_upgrade.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,10 @@ def v0_3_0(self):
365365
DROP TABLE IF EXISTS schedule_items""")
366366
sql.execute("""
367367
DROP TABLE IF EXISTS voices""")
368+
sql.execute("""
369+
DROP TABLE IF EXISTS files""")
370+
sql.execute("""
371+
DROP TABLE IF EXISTS file_exts""")
368372

369373
sql.execute("""
370374
CREATE TABLE "files" (
@@ -392,7 +396,6 @@ def v0_3_0(self):
392396
sql.execute("""
393397
INSERT INTO roles (name, config) VALUES ('output', ?)""", (json.dumps(output_conf),))
394398

395-
396399
sql.execute("DROP TABLE IF EXISTS `sandboxes`")
397400
sql.execute("""
398401
CREATE TABLE "sandboxes" (

0 commit comments

Comments
 (0)