mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-20 16:47:40 +02:00
[Haik]: cleanup: remove dead code and tighten TypeScript types across frontend — delete unused AutoRunLog.tsx, LogEntry.tsx, and clearClipboard(); remove SendMessagePayload, GenerateGroupMetaPayload, SearchHistoryParams, and summarizeToolInput from shared types and agentCardUtils; replace Record<string, any> with Record<string, unknown> in agentsTypes.ts and dashboardClipboard.ts; type getStatusColors param as ClaudeTokens; relocate richEditorUtils.ts from app/components to RichPromptEditor and update imports; narrow summarizeMessage export to module-private in BrowserAgentOverlay; wrap session-change state resets in queueMicrotask to avoid render-during-render warnings
This commit is contained in:
@@ -4,7 +4,7 @@ export interface ClipboardCard {
|
||||
type: CardType;
|
||||
id: string;
|
||||
name: string;
|
||||
meta: Record<string, any>;
|
||||
meta: Record<string, unknown>;
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
@@ -20,8 +20,4 @@ export function setClipboardCards(cards: ClipboardCard[]): void {
|
||||
|
||||
export function getClipboardCards(): ClipboardCard[] {
|
||||
return clipboardCards;
|
||||
}
|
||||
|
||||
export function clearClipboard(): void {
|
||||
clipboardCards = [];
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
export interface AgentMessage {
|
||||
id: string;
|
||||
role: 'user' | 'assistant' | 'tool_call' | 'tool_result' | 'system';
|
||||
content: any;
|
||||
content: string | Record<string, unknown>;
|
||||
timestamp: string;
|
||||
branch_id: string;
|
||||
parent_id: string | null;
|
||||
@@ -16,7 +16,7 @@ export interface ApprovalRequest {
|
||||
id: string;
|
||||
session_id: string;
|
||||
tool_name: string;
|
||||
tool_input: Record<string, any>;
|
||||
tool_input: Record<string, unknown>;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
@@ -86,20 +86,6 @@ export interface ContextPath {
|
||||
type: 'file' | 'directory';
|
||||
}
|
||||
|
||||
export interface SendMessagePayload {
|
||||
sessionId: string;
|
||||
prompt: string;
|
||||
mode?: string;
|
||||
model?: string;
|
||||
provider?: string;
|
||||
images?: Array<{ data: string; media_type: string }>;
|
||||
contextPaths?: Array<ContextPath>;
|
||||
forcedTools?: string[];
|
||||
attachedSkills?: Array<{ id: string; name: string; content: string }>;
|
||||
hidden?: boolean;
|
||||
selectedBrowserIds?: string[];
|
||||
}
|
||||
|
||||
export interface LaunchAndSendPayload {
|
||||
draftId: string;
|
||||
config: AgentConfig;
|
||||
@@ -115,21 +101,6 @@ export interface LaunchAndSendPayload {
|
||||
selectedBrowserIds?: string[];
|
||||
}
|
||||
|
||||
export interface GenerateGroupMetaPayload {
|
||||
sessionId: string;
|
||||
groupId: string;
|
||||
toolCalls: Array<{ tool: string; input_summary: string }>;
|
||||
resultsSummary?: string[];
|
||||
isRefinement?: boolean;
|
||||
}
|
||||
|
||||
export interface SearchHistoryParams {
|
||||
q?: string;
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
dashboardId?: string;
|
||||
}
|
||||
|
||||
export interface HistorySession {
|
||||
id: string;
|
||||
name: string;
|
||||
|
||||
Reference in New Issue
Block a user