stk-codegen 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -0
- package/dist/components/BootstrapStatus.d.ts +5 -1
- package/dist/config.d.ts +1 -0
- package/dist/core/agent/events.d.ts +3 -0
- package/dist/core/agent/types.d.ts +1 -0
- package/dist/hooks/useAgent.d.ts +1 -1
- package/dist/index.js +5 -5
- package/dist/services/websocketClient.d.ts +10 -3
- package/dist/tools/SearchText.d.ts +2 -12
- package/dist/tools/searchTextFallback.d.ts +20 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/ui/agent/buildInkViewModel.d.ts +4 -0
- package/dist/ui/agent/textFormatting.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import { BackendMessage, ClientMessage } from '../types/index.js';
|
|
2
2
|
type MessageHandler = (data: BackendMessage) => void;
|
|
3
|
-
|
|
3
|
+
type StatusChangeHandler = (status: 'connecting' | 'connected' | 'disconnected') => void;
|
|
4
|
+
export declare class WebSocketClient {
|
|
4
5
|
private ws;
|
|
5
6
|
private messageHandler;
|
|
7
|
+
private onStatusChange;
|
|
6
8
|
private sessionId;
|
|
7
9
|
private handshakeSent;
|
|
8
10
|
private isConnecting;
|
|
9
11
|
private connectionPromise;
|
|
12
|
+
private messageQueue;
|
|
13
|
+
private isReadyForUserInput;
|
|
14
|
+
private status;
|
|
15
|
+
private setStatus;
|
|
10
16
|
private createSession;
|
|
11
17
|
private setupWebSocketConnection;
|
|
18
|
+
private flushMessageQueue;
|
|
12
19
|
ensureConnected(): Promise<void>;
|
|
13
|
-
connect(messageHandler: MessageHandler): Promise<void>;
|
|
14
|
-
send(data: ClientMessage): void
|
|
20
|
+
connect(messageHandler: MessageHandler, onStatusChange: StatusChangeHandler): Promise<void>;
|
|
21
|
+
send(data: ClientMessage): Promise<void>;
|
|
15
22
|
}
|
|
16
23
|
export declare const websocketClient: WebSocketClient;
|
|
17
24
|
export {};
|
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
dir_path?: string;
|
|
4
|
-
include?: string;
|
|
5
|
-
case_sensitive?: boolean;
|
|
6
|
-
fixed_strings?: boolean;
|
|
7
|
-
context?: number;
|
|
8
|
-
}) => Promise<{
|
|
1
|
+
import { type SearchTextParams } from './searchTextFallback.js';
|
|
2
|
+
export declare const SearchText: (parameters: SearchTextParams) => Promise<{
|
|
9
3
|
matches: ({
|
|
10
4
|
file: string;
|
|
11
5
|
line: any;
|
|
12
6
|
content: any;
|
|
13
7
|
} | null)[];
|
|
14
|
-
error?: undefined;
|
|
15
|
-
} | {
|
|
16
|
-
error: any;
|
|
17
|
-
matches?: undefined;
|
|
18
8
|
}>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type SearchTextParams = {
|
|
2
|
+
pattern: string;
|
|
3
|
+
dir_path?: string;
|
|
4
|
+
include?: string;
|
|
5
|
+
case_sensitive?: boolean;
|
|
6
|
+
fixed_strings?: boolean;
|
|
7
|
+
context?: number;
|
|
8
|
+
};
|
|
9
|
+
export type SearchTextMatch = {
|
|
10
|
+
file: string;
|
|
11
|
+
line: number;
|
|
12
|
+
content: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Node-based SearchText fallback that avoids external binaries.
|
|
16
|
+
* Behavior is best-effort compatible with rg: returns line matches and line text.
|
|
17
|
+
*/
|
|
18
|
+
export declare const searchTextFallback: (params: SearchTextParams) => Promise<{
|
|
19
|
+
matches: SearchTextMatch[];
|
|
20
|
+
}>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -9,6 +9,10 @@ export interface ConversationMessage {
|
|
|
9
9
|
status: 'streaming' | 'finished';
|
|
10
10
|
content?: string;
|
|
11
11
|
};
|
|
12
|
+
highlightedBlock?: {
|
|
13
|
+
language?: string;
|
|
14
|
+
content: string;
|
|
15
|
+
};
|
|
12
16
|
}
|
|
13
17
|
export interface PendingShellCommand {
|
|
14
18
|
tool_name: string;
|
|
@@ -111,4 +115,10 @@ export type BackendMessage = RunTool | AgentGenerationCancelled | {
|
|
|
111
115
|
} | {
|
|
112
116
|
type: 'agent_finished';
|
|
113
117
|
payload: Record<string, never>;
|
|
118
|
+
} | {
|
|
119
|
+
type: 'handshake_ack';
|
|
120
|
+
payload: Record<string, never>;
|
|
121
|
+
} | {
|
|
122
|
+
type: 'bootstrap_finished';
|
|
123
|
+
payload: Record<string, never>;
|
|
114
124
|
};
|
|
@@ -7,6 +7,10 @@ export interface StaticMessageView {
|
|
|
7
7
|
toolParams?: Record<string, any>;
|
|
8
8
|
status?: 'running' | 'finished' | 'error';
|
|
9
9
|
isBootstrap?: boolean;
|
|
10
|
+
highlightedBlock?: {
|
|
11
|
+
language?: string;
|
|
12
|
+
content: string;
|
|
13
|
+
};
|
|
10
14
|
}
|
|
11
15
|
export interface ShellRunView {
|
|
12
16
|
id: string;
|