@@ -132,20 +132,11 @@ export const choiceAction: Action = {
132
132
responses : Memory [ ] ,
133
133
) : Promise < void > => {
134
134
try {
135
- console . log ( "*** CHOICE HANDLER ***\n" ) ;
136
-
137
- console . log ( "*** MESSAGE ***\n" , JSON . stringify ( message , null , 2 ) ) ;
138
-
139
135
const pendingTasks = await runtime . getDatabaseAdapter ( ) . getTasks ( {
140
136
roomId : message . roomId ,
141
137
tags : [ "AWAITING_CHOICE" ] ,
142
138
} ) ;
143
139
144
- console . log (
145
- "*** PENDING TASKS ***\n" ,
146
- JSON . stringify ( pendingTasks , null , 2 ) ,
147
- ) ;
148
-
149
140
if ( ! pendingTasks ?. length ) {
150
141
throw new Error ( "No pending tasks with options found" ) ;
151
142
}
@@ -154,11 +145,6 @@ export const choiceAction: Action = {
154
145
( task ) => task . metadata ?. options ,
155
146
) ;
156
147
157
- console . log (
158
- "*** TASKS WITH OPTIONS ***\n" ,
159
- JSON . stringify ( tasksWithOptions , null , 2 ) ,
160
- ) ;
161
-
162
148
if ( ! tasksWithOptions . length ) {
163
149
throw new Error ( "No tasks currently have options to select from." ) ;
164
150
}
@@ -180,11 +166,6 @@ export const choiceAction: Action = {
180
166
} ;
181
167
} ) ;
182
168
183
- console . log (
184
- "*** FORMATTED TASKS ***\n" ,
185
- JSON . stringify ( formattedTasks , null , 2 ) ,
186
- ) ;
187
-
188
169
const prompt = composePrompt ( {
189
170
state : {
190
171
...state ,
@@ -197,25 +178,15 @@ export const choiceAction: Action = {
197
178
template : optionExtractionTemplate ,
198
179
} ) ;
199
180
200
- console . log ( "*** PROMPT ***\n" , prompt ) ;
201
-
202
181
const result = await runtime . useModel ( ModelTypes . TEXT_SMALL , {
203
182
prompt,
204
183
stopSequences : [ ] ,
205
184
} ) ;
206
185
207
- console . log ( "*** RESULT ***\n" , result ) ;
208
-
209
186
const parsed = parseJSONObjectFromText ( result ) ;
210
187
const { taskId, selectedOption } = parsed ;
211
188
212
189
if ( taskId && selectedOption ) {
213
- console . log (
214
- "*** TASK ID AND SELECTED OPTION ***\n" ,
215
- taskId ,
216
- selectedOption ,
217
- ) ;
218
-
219
190
// Find the task by matching the shortened UUID
220
191
const taskMap = new Map (
221
192
formattedTasks . map ( ( task ) => [ task . taskId , task ] ) ,
@@ -246,7 +217,6 @@ export const choiceAction: Action = {
246
217
}
247
218
248
219
if ( selectedOption === "ABORT" ) {
249
- console . log ( "*** ABORT ***\n" ) ;
250
220
await runtime . getDatabaseAdapter ( ) . deleteTask ( selectedTask . id ) ;
251
221
await callback ( {
252
222
text : `Task "${ selectedTask . name } " has been cancelled.` ,
0 commit comments