@oh-my-pi/pi-coding-agent 13.14.2 → 13.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +150 -0
- package/package.json +10 -8
- package/src/autoresearch/command-initialize.md +34 -0
- package/src/autoresearch/command-resume.md +17 -0
- package/src/autoresearch/contract.ts +332 -0
- package/src/autoresearch/dashboard.ts +447 -0
- package/src/autoresearch/git.ts +243 -0
- package/src/autoresearch/helpers.ts +458 -0
- package/src/autoresearch/index.ts +693 -0
- package/src/autoresearch/prompt.md +227 -0
- package/src/autoresearch/resume-message.md +16 -0
- package/src/autoresearch/state.ts +386 -0
- package/src/autoresearch/tools/init-experiment.ts +310 -0
- package/src/autoresearch/tools/log-experiment.ts +833 -0
- package/src/autoresearch/tools/run-experiment.ts +640 -0
- package/src/autoresearch/types.ts +218 -0
- package/src/cli/args.ts +8 -2
- package/src/cli/initial-message.ts +58 -0
- package/src/config/keybindings.ts +423 -212
- package/src/config/model-registry.ts +1 -0
- package/src/config/model-resolver.ts +57 -9
- package/src/config/settings-schema.ts +38 -10
- package/src/config/settings.ts +1 -4
- package/src/export/html/template.css +43 -13
- package/src/export/html/template.generated.ts +1 -1
- package/src/export/html/template.html +1 -0
- package/src/export/html/template.js +107 -0
- package/src/extensibility/extensions/types.ts +31 -8
- package/src/internal-urls/docs-index.generated.ts +1 -1
- package/src/lsp/index.ts +1 -1
- package/src/main.ts +44 -44
- package/src/mcp/oauth-discovery.ts +1 -1
- package/src/modes/acp/acp-agent.ts +957 -0
- package/src/modes/acp/acp-event-mapper.ts +531 -0
- package/src/modes/acp/acp-mode.ts +13 -0
- package/src/modes/acp/index.ts +2 -0
- package/src/modes/components/agent-dashboard.ts +5 -4
- package/src/modes/components/custom-editor.ts +53 -51
- package/src/modes/components/extensions/extension-dashboard.ts +2 -1
- package/src/modes/components/history-search.ts +2 -1
- package/src/modes/components/hook-editor.ts +2 -1
- package/src/modes/components/hook-input.ts +8 -7
- package/src/modes/components/hook-selector.ts +15 -10
- package/src/modes/components/keybinding-hints.ts +9 -9
- package/src/modes/components/login-dialog.ts +3 -3
- package/src/modes/components/mcp-add-wizard.ts +2 -1
- package/src/modes/components/model-selector.ts +14 -3
- package/src/modes/components/oauth-selector.ts +2 -1
- package/src/modes/components/session-selector.ts +2 -1
- package/src/modes/components/settings-selector.ts +2 -1
- package/src/modes/components/status-line-segment-editor.ts +2 -1
- package/src/modes/components/tree-selector.ts +3 -2
- package/src/modes/components/user-message-selector.ts +3 -8
- package/src/modes/components/user-message.ts +16 -0
- package/src/modes/controllers/extension-ui-controller.ts +89 -4
- package/src/modes/controllers/input-controller.ts +48 -29
- package/src/modes/controllers/mcp-command-controller.ts +1 -1
- package/src/modes/index.ts +1 -0
- package/src/modes/interactive-mode.ts +17 -5
- package/src/modes/print-mode.ts +1 -1
- package/src/modes/prompt-action-autocomplete.ts +7 -7
- package/src/modes/rpc/rpc-mode.ts +7 -2
- package/src/modes/rpc/rpc-types.ts +1 -0
- package/src/modes/theme/theme.ts +53 -44
- package/src/modes/types.ts +9 -2
- package/src/modes/utils/hotkeys-markdown.ts +20 -20
- package/src/modes/utils/keybinding-matchers.ts +21 -0
- package/src/modes/utils/ui-helpers.ts +1 -1
- package/src/patch/hashline.ts +139 -127
- package/src/patch/index.ts +77 -59
- package/src/patch/shared.ts +19 -11
- package/src/prompts/tools/hashline.md +43 -116
- package/src/sdk.ts +34 -17
- package/src/session/agent-session.ts +436 -86
- package/src/session/messages.ts +23 -0
- package/src/session/session-manager.ts +97 -31
- package/src/tools/ask.ts +56 -30
- package/src/tools/bash-interceptor.ts +1 -39
- package/src/tools/bash-skill-urls.ts +1 -1
- package/src/tools/browser.ts +1 -1
- package/src/tools/gemini-image.ts +1 -1
- package/src/tools/resolve.ts +1 -1
- package/src/utils/child-process.ts +88 -0
- package/src/utils/image-input.ts +11 -1
- package/src/web/search/providers/codex.ts +10 -3
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Returns synthesized answers with web search sources.
|
|
7
7
|
*/
|
|
8
8
|
import * as os from "node:os";
|
|
9
|
-
import { getAgentDbPath, readSseJson } from "@oh-my-pi/pi-utils";
|
|
9
|
+
import { $env, getAgentDbPath, readSseJson } from "@oh-my-pi/pi-utils";
|
|
10
10
|
import packageJson from "../../../../package.json" with { type: "json" };
|
|
11
11
|
import { AgentStorage } from "../../../session/agent-storage";
|
|
12
12
|
import type { SearchResponse, SearchSource } from "../../../web/search/types";
|
|
@@ -21,6 +21,11 @@ const JWT_CLAIM_PATH = "https://api.openai.com/auth";
|
|
|
21
21
|
const DEFAULT_INSTRUCTIONS =
|
|
22
22
|
"You are a helpful assistant with web search capabilities. Search the web to answer the user's question accurately and cite your sources.";
|
|
23
23
|
|
|
24
|
+
function getModel(): string {
|
|
25
|
+
const configuredModel = $env.PI_CODEX_WEB_SEARCH_MODEL?.trim();
|
|
26
|
+
return configuredModel ? configuredModel : DEFAULT_MODEL;
|
|
27
|
+
}
|
|
28
|
+
|
|
24
29
|
export interface CodexSearchParams {
|
|
25
30
|
signal?: AbortSignal;
|
|
26
31
|
query: string;
|
|
@@ -188,8 +193,10 @@ async function callCodexSearch(
|
|
|
188
193
|
const url = `${CODEX_BASE_URL}${CODEX_RESPONSES_PATH}`;
|
|
189
194
|
const headers = buildCodexHeaders(auth.accessToken, auth.accountId);
|
|
190
195
|
|
|
196
|
+
const requestedModel = getModel();
|
|
197
|
+
|
|
191
198
|
const body: Record<string, unknown> = {
|
|
192
|
-
model:
|
|
199
|
+
model: requestedModel,
|
|
193
200
|
stream: true,
|
|
194
201
|
store: false,
|
|
195
202
|
input: [
|
|
@@ -226,7 +233,7 @@ async function callCodexSearch(
|
|
|
226
233
|
// Parse SSE stream
|
|
227
234
|
const answerParts: string[] = [];
|
|
228
235
|
const sources: SearchSource[] = [];
|
|
229
|
-
let model =
|
|
236
|
+
let model = requestedModel;
|
|
230
237
|
let requestId = "";
|
|
231
238
|
let usage: { inputTokens: number; outputTokens: number; totalTokens: number } | undefined;
|
|
232
239
|
|