fix: resolve Gitea issues #1–#5 (mobile layout, suggestion refresh, import/export icons, context rail default/icon, manual save)
CI / build (push) Waiting to run

Closes #1
Closes #2
Closes #3
Closes #4
Closes #5
This commit is contained in:
Schwitzz
2026-11-02 14:00:48 -06:00
parent 020563ed85
commit b01073eac0
11 changed files with 799 additions and 152 deletions
+16 -1
View File
@@ -112,6 +112,11 @@ export class AIStore {
if (this.loaded) return;
const rows = await this.persistence.list(this.projectId);
for (const row of rows) {
const cleanedSuggestions = (row.suggestions ?? []).filter(
(sg) =>
!String(sg.newText ?? sg.text ?? "").includes("—clear and unsparing") &&
!String(sg.newText ?? sg.text ?? "").includes("—sharp and unmistakable"),
);
this.sessions.set(row.id, {
id: row.id,
projectId: row.projectId,
@@ -122,7 +127,7 @@ export class AIStore {
providerId: row.providerId,
model: row.model,
messages: row.messages ?? [],
suggestions: row.suggestions ?? [],
suggestions: cleanedSuggestions,
notes: row.notes ?? [],
createdAt: row.createdAt,
updatedAt: row.updatedAt,
@@ -328,6 +333,16 @@ export class AIStore {
});
}
/** Clear all pending suggestions in a session before populating fresh suggestions from a new prompt. */
async clearPendingSuggestions(sessionId: string): Promise<AISession> {
return this.withTransaction(async () => {
const session = this.require(sessionId);
session.suggestions = session.suggestions.filter((s) => s.status !== "pending");
session.updatedAt = nowIso();
return this.clone(session);
});
}
/** Update a suggestion's line number or text anchor when editor blocks shift. */
async updateSuggestion(
sessionId: string,