mirror of
https://github.com/harivansh-afk/clanker-agent.git
synced 2026-04-18 10:03:30 +00:00
grind mode baby
This commit is contained in:
parent
aa70afbd7e
commit
ff6e39dd10
17 changed files with 1232 additions and 8 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue