refactor(app): remove redundant type constituents from type definitions (#692)

This commit is contained in:
Mohamed Boudra
2026-05-04 17:23:09 +08:00
parent 946152d820
commit 936deaa869
3 changed files with 7 additions and 7 deletions

View File

@@ -64,9 +64,9 @@ export type MessageEntry =
id: string;
timestamp: number;
toolName: string;
args: unknown | null;
result?: unknown | null;
error?: unknown | null;
args: unknown;
result?: unknown;
error?: unknown;
status: "executing" | "completed" | "failed";
};

View File

@@ -99,7 +99,7 @@ export interface AgentToolCallData {
callId: string;
name: string;
status: AgentToolCallStatus;
error: unknown | null;
error: unknown;
detail: ToolCallDetail;
metadata?: Record<string, unknown>;
}
@@ -331,7 +331,7 @@ function hasNonEmptyObject(value: unknown): boolean {
return isRecord(value) && Object.keys(value).length > 0;
}
function mergeUnknownValue(existing: unknown | null, incoming: unknown | null): unknown | null {
function mergeUnknownValue(existing: unknown, incoming: unknown): unknown {
if (incoming === null) {
return existing;
}
@@ -406,7 +406,7 @@ export function mergeToolCallDetail(
return incoming;
}
function inputFromUnknownDetail(detail: ToolCallDetail): unknown | null {
function inputFromUnknownDetail(detail: ToolCallDetail): unknown {
return detail.type === "unknown" ? detail.input : null;
}

View File

@@ -1,4 +1,4 @@
export type ShortcutKey = "mod" | "shift" | "alt" | "ctrl" | "meta" | string;
export type ShortcutKey = string;
export type ShortcutOs = "mac" | "non-mac";