refactor(shared): dedupe protocol schema typing and session/media helpers
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
export type UpdateAvailable = import("../../../src/infra/update-startup.js").UpdateAvailable;
|
||||
import type { ConfigUiHints } from "../../../src/shared/config-ui-hints-types.js";
|
||||
import type {
|
||||
GatewayAgentRow as SharedGatewayAgentRow,
|
||||
SessionsListResultBase,
|
||||
SessionsPatchResultBase,
|
||||
} from "../../../src/shared/session-types.js";
|
||||
export type { ConfigUiHints } from "../../../src/shared/config-ui-hints-types.js";
|
||||
|
||||
export type ChannelsStatusSnapshot = {
|
||||
@@ -314,17 +319,7 @@ export type GatewaySessionsDefaults = {
|
||||
contextTokens: number | null;
|
||||
};
|
||||
|
||||
export type GatewayAgentRow = {
|
||||
id: string;
|
||||
name?: string;
|
||||
identity?: {
|
||||
name?: string;
|
||||
theme?: string;
|
||||
emoji?: string;
|
||||
avatar?: string;
|
||||
avatarUrl?: string;
|
||||
};
|
||||
};
|
||||
export type GatewayAgentRow = SharedGatewayAgentRow;
|
||||
|
||||
export type AgentsListResult = {
|
||||
defaultId: string;
|
||||
@@ -422,27 +417,16 @@ export type GatewaySessionRow = {
|
||||
contextTokens?: number;
|
||||
};
|
||||
|
||||
export type SessionsListResult = {
|
||||
ts: number;
|
||||
path: string;
|
||||
count: number;
|
||||
defaults: GatewaySessionsDefaults;
|
||||
sessions: GatewaySessionRow[];
|
||||
};
|
||||
export type SessionsListResult = SessionsListResultBase<GatewaySessionsDefaults, GatewaySessionRow>;
|
||||
|
||||
export type SessionsPatchResult = {
|
||||
ok: true;
|
||||
path: string;
|
||||
key: string;
|
||||
entry: {
|
||||
sessionId: string;
|
||||
updatedAt?: number;
|
||||
thinkingLevel?: string;
|
||||
verboseLevel?: string;
|
||||
reasoningLevel?: string;
|
||||
elevatedLevel?: string;
|
||||
};
|
||||
};
|
||||
export type SessionsPatchResult = SessionsPatchResultBase<{
|
||||
sessionId: string;
|
||||
updatedAt?: number;
|
||||
thinkingLevel?: string;
|
||||
verboseLevel?: string;
|
||||
reasoningLevel?: string;
|
||||
elevatedLevel?: string;
|
||||
}>;
|
||||
|
||||
export type {
|
||||
CostUsageDailyEntry,
|
||||
|
||||
Reference in New Issue
Block a user