File tree Expand file tree Collapse file tree 2 files changed +0
-60
lines changed Expand file tree Collapse file tree 2 files changed +0
-60
lines changed Original file line number Diff line number Diff line change @@ -101,14 +101,6 @@ export class APIService {
101101 private _cache = new APICache ( ) ;
102102 private _requestTracker = new RequestTracker ( ) ;
103103
104- /**
105- * Submit a new input task to generate a plan
106- * @param inputTask The task description and optional session ID
107- * @returns Promise with the response containing session and plan IDs
108- */
109- async submitInputTask ( inputTask : InputTask ) : Promise < InputTaskResponse > {
110- return apiClient . post ( API_ENDPOINTS . INPUT_TASK , inputTask ) ;
111- }
112104
113105 /**
114106 * Create a new plan with RAI validation
@@ -221,29 +213,6 @@ export class APIService {
221213 return fetcher ( ) ;
222214 }
223215
224- /**
225- * Get steps for a specific plan
226- * @param planId Plan ID
227- * @param useCache Whether to use cached data or force fresh fetch
228- * @returns Promise with array of steps
229- */
230- async getSteps ( planId : string , useCache = true ) : Promise < Step [ ] > {
231- const cacheKey = `steps_${ planId } ` ;
232-
233- const fetcher = async ( ) => {
234- const data = await apiClient . get ( `${ API_ENDPOINTS . STEPS } /${ planId } ` ) ;
235- if ( useCache ) {
236- this . _cache . set ( cacheKey , data , 30000 ) ; // Cache for 30 seconds
237- }
238- return data ;
239- } ;
240-
241- if ( useCache ) {
242- return this . _requestTracker . trackRequest ( cacheKey , fetcher ) ;
243- }
244-
245- return fetcher ( ) ;
246- }
247216
248217 /**
249218 * Approve a plan for execution
Original file line number Diff line number Diff line change @@ -167,35 +167,6 @@ export class TaskService {
167167
168168 return cleanedText ;
169169 }
170- /**
171- * Submit an input task to create a new plan
172- * @param description Task description
173- * @returns Promise with the response containing session and plan IDs
174- */
175- static async submitInputTask (
176- description : string
177- ) : Promise < InputTaskResponse > {
178- const sessionId = this . generateSessionId ( ) ;
179-
180- const inputTask : InputTask = {
181- session_id : sessionId ,
182- description : description ,
183- } ;
184-
185- try {
186- return await apiService . submitInputTask ( inputTask ) ;
187- } catch ( error : any ) {
188- // You can customize this logic as needed
189- let message = "Failed to create task." ;
190- if ( error ?. response ?. data ?. message ) {
191- message = error . response . data . message ;
192- } else if ( error ?. message ) {
193- message = error . message ?. detail ? error . message . detail : error . message ;
194- }
195- // Throw a new error with a user-friendly message
196- throw new Error ( message ) ;
197- }
198- }
199170
200171 /**
201172 * Create a new plan with RAI validation
You can’t perform that action at this time.
0 commit comments