Improve agent autonomy and diff view readability
Agent behavior improvements: - Add project context detection (tsconfig.json, pom.xml, etc.) - Enforce validation after changes (tsc --noEmit, mvn compile, etc.) - Run tests automatically - never ask "do you want me to run tests" - Complete full loop: create → type-check → test → confirm - Add command detection for direct execution (run tree, run ls) Diff view improvements: - Use darker backgrounds for added/removed lines - Add diffLineBgAdded, diffLineBgRemoved, diffLineText theme colors - Improve text visibility with white text on dark backgrounds - Update both React/Ink and SolidJS diff components Streaming fixes: - Fix tool call argument accumulation using OpenAI index field - Fix streaming content display after tool calls - Add consecutive error tracking to prevent token waste Other changes: - ESC to abort operations, Ctrl+C to exit - Fix model selection when provider changes in cascade mode - Add debug logging for troubleshooting - Move tests to root tests/ folder - Fix banner test GRADIENT_COLORS reference
This commit is contained in:
32
src/interfaces/CopilotModels.ts
Normal file
32
src/interfaces/CopilotModels.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Copilot Models API Interfaces
|
||||
*/
|
||||
|
||||
export interface ModelBilling {
|
||||
is_premium: boolean;
|
||||
multiplier: number;
|
||||
restricted_to?: string[];
|
||||
}
|
||||
|
||||
export interface ModelCapabilities {
|
||||
type?: string;
|
||||
limits?: {
|
||||
max_output_tokens?: number;
|
||||
};
|
||||
supports?: {
|
||||
tool_calls?: boolean;
|
||||
streaming?: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ModelsApiModel {
|
||||
id: string;
|
||||
name?: string;
|
||||
model_picker_enabled?: boolean;
|
||||
billing?: ModelBilling;
|
||||
capabilities?: ModelCapabilities;
|
||||
}
|
||||
|
||||
export interface ModelsApiResponse {
|
||||
data: ModelsApiModel[];
|
||||
}
|
||||
10
src/interfaces/StreamCallbacksWithState.ts
Normal file
10
src/interfaces/StreamCallbacksWithState.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Stream callbacks with state tracking
|
||||
*/
|
||||
|
||||
import type { StreamCallbacks } from "@/types/streaming";
|
||||
|
||||
export interface StreamCallbacksWithState {
|
||||
callbacks: StreamCallbacks;
|
||||
hasReceivedContent: () => boolean;
|
||||
}
|
||||
10
src/interfaces/StreamingChatOptions.ts
Normal file
10
src/interfaces/StreamingChatOptions.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Streaming Chat Options
|
||||
*/
|
||||
|
||||
import type { AgentOptions } from "@interfaces/AgentOptions";
|
||||
import type { ModelSwitchInfo } from "@/types/streaming";
|
||||
|
||||
export interface StreamingChatOptions extends AgentOptions {
|
||||
onModelSwitch?: (info: ModelSwitchInfo) => void;
|
||||
}
|
||||
Reference in New Issue
Block a user