fix(multi): corrected auth messaging and google tool schemas
This commit is contained in:
@@ -17,7 +17,7 @@ import type { Agent, AgentEvent, AgentMessage, AgentState, AgentTool, ThinkingLe
|
||||
import type { AssistantMessage, ImageContent, Message, Model, TextContent, Usage } from "@oh-my-pi/pi-ai";
|
||||
import { isContextOverflow, modelsAreEqual, supportsXhigh } from "@oh-my-pi/pi-ai";
|
||||
import type { Rule } from "../capability/rule";
|
||||
import { getAuthPath } from "../config";
|
||||
import { getAgentDbPath } from "../config";
|
||||
import { theme } from "../modes/interactive/theme/theme";
|
||||
import { type BashResult, executeBash as executeBashCommand, executeBashWithOperations } from "./bash-executor";
|
||||
import {
|
||||
@@ -761,7 +761,7 @@ export class AgentSession {
|
||||
if (!this.model) {
|
||||
throw new Error(
|
||||
"No model selected.\n\n" +
|
||||
`Use /login, set an API key environment variable, or create ${getAuthPath()}\n\n` +
|
||||
`Use /login, set an API key environment variable, or create ${getAgentDbPath()}\n\n` +
|
||||
"Then use /model to select a model.",
|
||||
);
|
||||
}
|
||||
@@ -771,7 +771,7 @@ export class AgentSession {
|
||||
if (!apiKey) {
|
||||
throw new Error(
|
||||
`No API key found for ${this.model.provider}.\n\n` +
|
||||
`Use /login, set an API key environment variable, or create ${getAuthPath()}`,
|
||||
`Use /login, set an API key environment variable, or create ${getAgentDbPath()}`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
|
||||
import type { OAuthProvider } from "@oh-my-pi/pi-ai";
|
||||
import type { Component } from "@oh-my-pi/pi-tui";
|
||||
import { Input, Loader, Spacer, Text } from "@oh-my-pi/pi-tui";
|
||||
import { getAuthPath } from "../../../config";
|
||||
import { getAgentDbPath } from "../../../config";
|
||||
import { SessionManager } from "../../../core/session-manager";
|
||||
import { setPreferredImageProvider, setPreferredWebSearchProvider } from "../../../core/tools/index";
|
||||
import { disableProvider, enableProvider } from "../../../discovery";
|
||||
@@ -546,7 +546,7 @@ export class SelectorController {
|
||||
),
|
||||
);
|
||||
this.ctx.chatContainer.addChild(
|
||||
new Text(theme.fg("dim", `Credentials saved to ${getAuthPath()}`), 1, 0),
|
||||
new Text(theme.fg("dim", `Credentials saved to ${getAgentDbPath()}`), 1, 0),
|
||||
);
|
||||
this.ctx.ui.requestRender();
|
||||
} catch (error: unknown) {
|
||||
@@ -566,7 +566,7 @@ export class SelectorController {
|
||||
),
|
||||
);
|
||||
this.ctx.chatContainer.addChild(
|
||||
new Text(theme.fg("dim", `Credentials removed from ${getAuthPath()}`), 1, 0),
|
||||
new Text(theme.fg("dim", `Credentials removed from ${getAgentDbPath()}`), 1, 0),
|
||||
);
|
||||
this.ctx.ui.requestRender();
|
||||
} catch (error: unknown) {
|
||||
|
||||
Reference in New Issue
Block a user