refactor(app): remove redundant type constituents from type definitions (#692)
This commit is contained in:
@@ -64,9 +64,9 @@ export type MessageEntry =
|
|||||||
id: string;
|
id: string;
|
||||||
timestamp: number;
|
timestamp: number;
|
||||||
toolName: string;
|
toolName: string;
|
||||||
args: unknown | null;
|
args: unknown;
|
||||||
result?: unknown | null;
|
result?: unknown;
|
||||||
error?: unknown | null;
|
error?: unknown;
|
||||||
status: "executing" | "completed" | "failed";
|
status: "executing" | "completed" | "failed";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ export interface AgentToolCallData {
|
|||||||
callId: string;
|
callId: string;
|
||||||
name: string;
|
name: string;
|
||||||
status: AgentToolCallStatus;
|
status: AgentToolCallStatus;
|
||||||
error: unknown | null;
|
error: unknown;
|
||||||
detail: ToolCallDetail;
|
detail: ToolCallDetail;
|
||||||
metadata?: Record<string, unknown>;
|
metadata?: Record<string, unknown>;
|
||||||
}
|
}
|
||||||
@@ -331,7 +331,7 @@ function hasNonEmptyObject(value: unknown): boolean {
|
|||||||
return isRecord(value) && Object.keys(value).length > 0;
|
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) {
|
if (incoming === null) {
|
||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
@@ -406,7 +406,7 @@ export function mergeToolCallDetail(
|
|||||||
return incoming;
|
return incoming;
|
||||||
}
|
}
|
||||||
|
|
||||||
function inputFromUnknownDetail(detail: ToolCallDetail): unknown | null {
|
function inputFromUnknownDetail(detail: ToolCallDetail): unknown {
|
||||||
return detail.type === "unknown" ? detail.input : null;
|
return detail.type === "unknown" ? detail.input : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export type ShortcutKey = "mod" | "shift" | "alt" | "ctrl" | "meta" | string;
|
export type ShortcutKey = string;
|
||||||
|
|
||||||
export type ShortcutOs = "mac" | "non-mac";
|
export type ShortcutOs = "mac" | "non-mac";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user