@@ -9,11 +9,7 @@ import {
99 ConversationSearchRequest ,
1010 ConversationSearchResponse ,
1111} from '../models/conversation' ;
12- import {
13- AgentBase ,
14- ConversationID ,
15- Success ,
16- } from '../types/base' ;
12+ import { AgentBase , ConversationID , Success } from '../types/base' ;
1713
1814export interface ConversationManagerOptions {
1915 host : string ;
@@ -39,10 +35,15 @@ export class ConversationManager {
3935 /**
4036 * Search/list conversations
4137 */
42- async searchConversations ( options : ConversationSearchRequest = { } ) : Promise < ConversationSearchResponse > {
43- const response = await this . client . get < ConversationSearchResponse > ( '/api/conversations/search' , {
44- params : options ,
45- } ) ;
38+ async searchConversations (
39+ options : ConversationSearchRequest = { }
40+ ) : Promise < ConversationSearchResponse > {
41+ const response = await this . client . get < ConversationSearchResponse > (
42+ '/api/conversations/search' ,
43+ {
44+ params : options ,
45+ }
46+ ) ;
4647 return response . data ;
4748 }
4849
@@ -58,7 +59,7 @@ export class ConversationManager {
5859 page_id : nextPageId ,
5960 limit : 100 ,
6061 } ) ;
61-
62+
6263 conversations . push ( ...response . items ) ;
6364 nextPageId = response . next_page_id ;
6465 } while ( nextPageId ) ;
@@ -70,7 +71,9 @@ export class ConversationManager {
7071 * Get a specific conversation by ID
7172 */
7273 async getConversation ( conversationId : ConversationID ) : Promise < ConversationInfo > {
73- const response = await this . client . get < ConversationInfo > ( `/api/conversations/${ conversationId } ` ) ;
74+ const response = await this . client . get < ConversationInfo > (
75+ `/api/conversations/${ conversationId } `
76+ ) ;
7477 return response . data ;
7578 }
7679
@@ -114,4 +117,4 @@ export class ConversationManager {
114117 close ( ) : void {
115118 this . client . close ( ) ;
116119 }
117- }
120+ }
0 commit comments