Files
grok-cli/src/types/index.ts
T
Cursor AgentandIsmail Pelaseyed d53229bf9f feat: differentiated UI, colored modes, clean logo, remove xAI labels
- Remove all 'xAI' labels from model picker and prompt box
- Mode colors: blue (#5c9cf5) for Agent, yellow (#e5c07b) for Plan, orange (#f5a742) for Ask
- Logo: clean '✦ G R O K' text with tagline (no broken Unicode art)
- Differentiated UI from OpenCode:
  - Home: centered logo + tagline, input with thin single-line border colored by mode,
    mode selector row showing all three modes with dots, model name on right
  - Session: top bar with model + mode instead of bordered header panel,
    thin separator line, user messages with colored ▸ prefix instead of left-border panels,
    input with colored single-line border instead of thick ┃ accent
  - Tool output in subtle background panels
  - Model picker: bordered modal instead of borderless floating panel,
    category headers in muted text, no 'xAI' provider label
- Simplified theme: removed unused color tokens, added textDim for ultra-subtle text

Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
2026-03-18 07:56:15 +00:00

71 lines
1.5 KiB
TypeScript

export interface ToolResult {
success: boolean;
output?: string;
error?: string;
}
export interface Message {
role: "system" | "user" | "assistant" | "tool";
content: string;
tool_calls?: ToolCall[];
tool_call_id?: string;
}
export interface ToolCall {
id: string;
type: "function";
function: {
name: string;
arguments: string;
};
}
export interface ToolDefinition {
type: "function";
function: {
name: string;
description: string;
parameters: {
type: "object";
properties: Record<string, unknown>;
required: string[];
};
};
}
export interface ChatEntry {
type: "user" | "assistant" | "tool_call" | "tool_result" | "search_result";
content: string;
timestamp: Date;
toolCalls?: ToolCall[];
toolCall?: ToolCall;
toolResult?: ToolResult;
isStreaming?: boolean;
}
export interface StreamChunk {
type: "content" | "tool_calls" | "tool_result" | "search_result" | "done" | "error" | "reasoning";
content?: string;
toolCalls?: ToolCall[];
toolCall?: ToolCall;
toolResult?: ToolResult;
}
export interface ModelInfo {
id: string;
name: string;
contextWindow: number;
inputPrice: number;
outputPrice: number;
reasoning: boolean;
description: string;
}
export type AgentMode = "agent" | "plan" | "ask";
export const MODES: { id: AgentMode; label: string; color: string }[] = [
{ id: "agent", label: "Agent", color: "#5c9cf5" },
{ id: "plan", label: "Plan", color: "#e5c07b" },
{ id: "ask", label: "Ask", color: "#f5a742" },
];