refactor(search): always send searches as incognito (#14)

Hardcode is_incognito: true in the Perplexity request and remove the
toggle surface: the incognito tool parameter, PI_PERPLEXITY_INCOGNITO
env var, config file field, /perplexity-config prompt, and TUI status
indicators. Config and resolveDefaultModel are now model-only.

Supersedes the incognito portion of PR #4.

Co-authored-by: Ivan Pereira <183991+ivanrvpereira@users.noreply.github.com>
This commit is contained in:
Ivan Pereira
2026-07-16 15:28:02 +01:00
committed by GitHub
co-authored by Ivan Pereira
parent a9f252715e
commit 97aab3e9b9
14 changed files with 55 additions and 143 deletions
+3 -5
View File
@@ -28,7 +28,7 @@ describe("perplexity-config command", () => {
test("marks the configured model as current in the select options", async () => {
let handler: ((args: string, ctx: any) => Promise<void>) | undefined;
await saveConfig({ model: "gpt54", incognito: false }, configPath);
await saveConfig({ model: "gpt54" }, configPath);
registerPerplexityConfigCommand(
{
@@ -54,7 +54,6 @@ describe("perplexity-config command", () => {
options = receivedOptions;
return "GPT-5.4 [current]";
},
confirm: async () => false,
notify: () => undefined,
},
});
@@ -85,15 +84,14 @@ describe("perplexity-config command", () => {
await handler!("", {
ui: {
select: async () => "GPT-5.4",
confirm: async () => false,
notify: (message: string, level: string) => notifications.push({ message, level }),
},
});
const raw = await readFile(configPath, "utf8");
expect(JSON.parse(raw)).toEqual({ model: "gpt54", incognito: false });
expect(JSON.parse(raw)).toEqual({ model: "gpt54" });
expect(notifications).toContainEqual({
message: "Perplexity config saved:\nModel: gpt54 (GPT-5.4)\nIncognito: false",
message: "Perplexity config saved:\nModel: gpt54 (GPT-5.4)",
level: "info",
});
});