feat: snip a region into chat, and make links clickable (#14)

This commit was merged in pull request #14.
This commit is contained in:
2026-10-05 08:38:50 +00:00
parent f5d1ced4d6
commit 576c5946f7
44 changed files with 3890 additions and 120 deletions
+20
View File
@@ -53,6 +53,26 @@ describe("resolvePreferences", () => {
expect(resolved.showReasoning).toBe(true);
expect(resolved.think).toBeUndefined();
expect(resolved.resumeTimeoutMs).toBe(HOUR);
// An empty string rather than undefined, so callers never branch on it.
expect(resolved.place).toBe("");
});
it("leaves IP geolocation off unless it was switched on", () => {
// The one setting that sends something about the user to a third party is
// opted into, never defaulted into.
expect(resolvePreferences({}).ipGeolocation).toBe(false);
expect(resolvePreferences({ ipGeolocation: true }).ipGeolocation).toBe(true);
expect(resolvePreferences({ ipGeolocation: false }).ipGeolocation).toBe(false);
});
it("keeps the configured location, trimmed", () => {
expect(resolvePreferences({ location: " Cebu City, Philippines " }).place).toBe(
"Cebu City, Philippines",
);
});
it("treats a whitespace-only location as unset", () => {
expect(resolvePreferences({ location: " " }).place).toBe("");
});
it("honours the display toggles being switched off", () => {