turbowrap-issue-widget 1.0.10 → 1.0.12

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.
@@ -1,4 +1,4 @@
1
- import { WidgetConfig, AnalyzeRequest, AnalyzeResult, FinalizeRequest, IssueCreatedResult, ChatContext, ChatSessionResponse, ChatActionData } from './types';
1
+ import { WidgetConfig, AnalyzeRequest, AnalyzeResult, FinalizeRequest, IssueCreatedResult, ChatContext, ChatSessionOptions, ChatSessionResponse, ChatActionData } from './types';
2
2
  export declare class IssueAPIClient {
3
3
  private baseUrl;
4
4
  private apiKey;
@@ -7,7 +7,7 @@ export declare class IssueAPIClient {
7
7
  analyzeIssue(data: AnalyzeRequest, onProgress: (msg: string) => void, onComplete: (result: AnalyzeResult) => void, onError: (error: string) => void): Promise<void>;
8
8
  finalizeIssue(data: FinalizeRequest, onProgress: (msg: string) => void, onComplete: (result: IssueCreatedResult) => void, onError: (error: string) => void): Promise<void>;
9
9
  private parseSSEStream;
10
- createChatSession(context?: ChatContext): Promise<ChatSessionResponse>;
10
+ createChatSession(options?: ChatSessionOptions): Promise<ChatSessionResponse>;
11
11
  sendChatMessage(sessionId: string, message: string, context: ChatContext | undefined, onChunk: (content: string) => void, onAction: (action: ChatActionData) => void, onComplete: () => void, onError: (error: string) => void): Promise<void>;
12
12
  deleteChatSession(sessionId: string): Promise<void>;
13
13
  private parseChatSSEStream;
@@ -3,6 +3,7 @@ export interface WidgetConfig {
3
3
  apiUrl: string;
4
4
  apiKey: string;
5
5
  teamId: string;
6
+ repositoryId?: string;
6
7
  position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
7
8
  theme?: 'light' | 'dark' | 'auto';
8
9
  buttonText?: string;
@@ -26,6 +27,7 @@ export interface AnalyzeRequest {
26
27
  description: string;
27
28
  issueType: IssueType;
28
29
  screenshots: Blob[];
30
+ repositoryId?: string;
29
31
  figmaLink?: string;
30
32
  websiteLink?: string;
31
33
  selectedElement?: ElementInfo;
@@ -76,8 +78,15 @@ export interface ChatMessage {
76
78
  timestamp: Date;
77
79
  isStreaming?: boolean;
78
80
  }
81
+ export interface ChatSessionOptions {
82
+ context?: ChatContext;
83
+ model?: string;
84
+ agent?: string;
85
+ }
79
86
  export interface ChatSessionResponse {
80
87
  session_id: string;
88
+ model: string;
89
+ agent: string;
81
90
  message?: string;
82
91
  }
83
92
  export interface ChatActionData {