mirror of
https://github.com/harivansh-afk/clanker-agent.git
synced 2026-04-15 14:03:49 +00:00
grind mode baby
This commit is contained in:
parent
aa70afbd7e
commit
ff6e39dd10
17 changed files with 1232 additions and 8 deletions
|
|
@ -8,8 +8,8 @@
|
|||
process.title = "pi";
|
||||
|
||||
import { setBedrockProviderModule } from "@mariozechner/pi-ai";
|
||||
import { bedrockProviderModule } from "@mariozechner/pi-ai/bedrock-provider";
|
||||
import { EnvHttpProxyAgent, setGlobalDispatcher } from "undici";
|
||||
import { bedrockProviderModule } from "../../ai/src/bedrock-provider.js";
|
||||
import { main } from "./main.js";
|
||||
|
||||
setGlobalDispatcher(new EnvHttpProxyAgent());
|
||||
|
|
|
|||
|
|
@ -995,12 +995,15 @@ export interface RegisteredCommand {
|
|||
// Extension API
|
||||
// ============================================================================
|
||||
|
||||
type ExtensionHandlerResult<R> = [R] extends [undefined]
|
||||
? Promise<void> | void
|
||||
: Promise<R | undefined> | R | undefined;
|
||||
|
||||
/** Handler function type for events */
|
||||
// biome-ignore lint/suspicious/noConfusingVoidType: void allows bare return statements
|
||||
export type ExtensionHandler<E, R = undefined> = (
|
||||
event: E,
|
||||
ctx: ExtensionContext,
|
||||
) => Promise<R | void> | R | void;
|
||||
) => ExtensionHandlerResult<R>;
|
||||
|
||||
/**
|
||||
* ExtensionAPI passed to extension factory functions.
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ import { join } from "node:path";
|
|||
import { URL } from "node:url";
|
||||
import type { AgentMessage } from "@mariozechner/pi-agent-core";
|
||||
import type { AgentSession, AgentSessionEvent } from "../agent-session.js";
|
||||
import type { Settings } from "../settings-manager.js";
|
||||
import { extractMessageText, getLastAssistantText } from "./helpers.js";
|
||||
import {
|
||||
type GatewayEvent,
|
||||
type GatewayQueuedMessage,
|
||||
HttpError,
|
||||
type ManagedGatewaySession,
|
||||
} from "./internal-types.js";
|
||||
|
|
@ -29,7 +29,6 @@ import type {
|
|||
HistoryPart,
|
||||
ModelInfo,
|
||||
} from "./types.js";
|
||||
import type { Settings } from "../settings-manager.js";
|
||||
import {
|
||||
createVercelStreamListener,
|
||||
errorVercelStream,
|
||||
|
|
|
|||
|
|
@ -836,10 +836,10 @@ export class ToolExecutionComponent extends Container {
|
|||
.join("\n");
|
||||
if (remaining > 0) {
|
||||
text +=
|
||||
theme.fg(
|
||||
`${theme.fg(
|
||||
"muted",
|
||||
`\n... (${remaining} more lines, ${totalLines} total,`,
|
||||
) + ` ${keyHint("expandTools", "to expand")})`;
|
||||
)} ${keyHint("expandTools", "to expand")})`;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import type { AgentSessionEvent } from "../src/core/agent-session.js";
|
|||
import {
|
||||
createVercelStreamListener,
|
||||
extractUserText,
|
||||
} from "../src/core/vercel-ai-stream.js";
|
||||
} from "../src/core/gateway/vercel-ai-stream.js";
|
||||
|
||||
describe("extractUserText", () => {
|
||||
it("extracts text from useChat v5+ format with parts", () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue