Hardcode Go default empty response

This commit is contained in:
Brandon Zhang
2026-03-27 17:55:05 +08:00
parent 372e30ff6f
commit f437f6939c
6 changed files with 26 additions and 59 deletions

View File

@@ -40,11 +40,10 @@ CREATE TABLE IF NOT EXISTS agent_activity (
`
// defaultSettings seeds initial values; OR IGNORE means existing rows are unchanged.
const defaultSettings = `
INSERT OR IGNORE INTO settings (key, value) VALUES ('default_wait_seconds', '10');
INSERT OR IGNORE INTO settings (key, value) VALUES ('default_empty_response', '');
INSERT OR IGNORE INTO settings (key, value) VALUES ('agent_stale_after_seconds','30');
`
const defaultSettings = "" +
"INSERT OR IGNORE INTO settings (key, value) VALUES ('default_wait_seconds', '10');\n" +
"INSERT OR IGNORE INTO settings (key, value) VALUES ('agent_stale_after_seconds', '30');\n" +
"DELETE FROM settings WHERE key = 'default_empty_response';\n"
// Open opens (creating if necessary) a SQLite database at dbPath, applies the
// schema, and seeds default settings.
@@ -74,4 +73,3 @@ func Open(dbPath string) (*sql.DB, error) {
return db, nil
}