feat: project dropdown in sidebar, resizable AI sidebar with snap, ctx & t/s telemetry, live line-number re-anchoring, and thinking indicator

This commit is contained in:
Schwitzz
2026-10-30 11:53:32 -05:00
parent b1c22229c5
commit 271d1e2c79
6 changed files with 617 additions and 78 deletions
+19
View File
@@ -328,6 +328,25 @@ export class AIStore {
});
}
/** Update a suggestion's line number or text anchor when editor blocks shift. */
async updateSuggestion(
sessionId: string,
suggestionId: string,
patch: Partial<Pick<AISuggestion, "lineNumber" | "originalText" | "newText" | "text">>,
): Promise<AISession> {
return this.withTransaction(async () => {
const session = this.require(sessionId);
const suggestion = session.suggestions.find((s) => s.id === suggestionId);
if (!suggestion) return this.clone(session);
if (patch.lineNumber !== undefined) suggestion.lineNumber = patch.lineNumber;
if (patch.originalText !== undefined) suggestion.originalText = patch.originalText;
if (patch.newText !== undefined) suggestion.newText = patch.newText;
if (patch.text !== undefined) suggestion.text = patch.text;
session.updatedAt = nowIso();
return this.clone(session);
});
}
/** Add a note to a session and persist it. */
async addNote(sessionId: string, note: Omit<AINote, "id" | "createdAt" | "updatedAt">): Promise<AISession> {
return this.withTransaction(async () => {