Files
dsh-telegram-channel/lib/apiproxy.d.ts
T
owoandCursor fb5a334edb feat: /last and bind button for previous Q/A context (v0.3.4)
After attaching a session, show a button and /last command that load the latest human/assistant turn via session.history so phone users can continue with context.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-14 20:25:07 +08:00

35 lines
981 B
TypeScript

import type { Context } from '@deepseek-ai/cordis';
/** Loose ApiProxy surface used by catalog + model helpers. */
export type ApiProxySessions = {
list?: (req: {
rpcId: string;
payload: unknown;
}) => Promise<unknown>;
history?: (req: {
rpcId: string;
payload: unknown;
}) => Promise<unknown>;
models?: (req: {
rpcId: string;
payload: unknown;
}) => Promise<unknown>;
selectModel?: (req: {
rpcId: string;
payload: unknown;
}) => Promise<unknown>;
};
export type ApiProxyLike = {
workspace?: {
list?: (req: {
rpcId: string;
payload: unknown;
}) => Promise<unknown>;
};
sessions?: ApiProxySessions;
};
/**
* Resolve host apiProxy without requiring Cordis inject.
* Direct `ctx.apiProxy` throws "cannot get property without inject" on real fibers.
*/
export declare function resolveApiProxy(ctx: Context): ApiProxyLike | undefined;