Allow message retries for "pending" status, refactor message context handling, remove workspace import/export routes, and add SQLite-backed rate limiting.
This commit is contained in:
@@ -52,7 +52,23 @@ export function createMemoryPanel({state}) {
|
||||
summary.input.rows = 6;
|
||||
const summaryHelp = document.createElement("p"); summaryHelp.className = "subtitle";
|
||||
summaryHelp.textContent = "Correct outdated information here. Future automatic summaries build on your corrections. Clear the field and save to remove the summary.";
|
||||
panel.content.append(summary.wrapper, summaryHelp, actionButton("Save summary", () => run(put(`/chats/${id}/summary`, {summary: summary.input.value, previousSummary: result.summary}), "summary")));
|
||||
panel.content.append(summary.wrapper, summaryHelp,
|
||||
actionButton("Save summary", () => run(put(`/chats/${id}/summary`, {summary: summary.input.value, previousSummary: result.summary}), "summary")));
|
||||
if (result.summary) {
|
||||
const forget = actionButton("Forget running summary", () => run(put(`/chats/${id}/summary`, {summary: "", previousSummary: result.summary}), "summary"));
|
||||
forget.title = "Remove the automatic summary from conversation memory";
|
||||
panel.content.append(forget);
|
||||
const sourceHeading = document.createElement("h4"); sourceHeading.textContent = "Messages included in this summary";
|
||||
panel.content.append(sourceHeading);
|
||||
for (const source of result.summarySources || []) {
|
||||
const item = document.createElement("details"); item.className = "memory-summary-source";
|
||||
const label = document.createElement("summary");
|
||||
const excerpt = source.content.length > 160 ? `${source.content.slice(0, 157)}...` : source.content;
|
||||
label.textContent = `#${source.id} · ${source.role === "user" ? "You" : "Assistant"}: ${excerpt}`;
|
||||
const content = document.createElement("p"); content.textContent = source.content;
|
||||
item.append(label, content); panel.content.append(item);
|
||||
}
|
||||
}
|
||||
const heading = document.createElement("h4"); heading.textContent = "Saved facts";
|
||||
const hint = document.createElement("p"); hint.className = "subtitle";
|
||||
hint.textContent = `The ${context.memoryFactLimit} most recently updated facts are included in context. Edit or remove facts that are no longer accurate.`;
|
||||
|
||||
Reference in New Issue
Block a user