@@ -249,7 +249,7 @@ <h5 class="font-weight-bold">{{ column.key }}</h5>
249
249
< div class ="pa-4 ">
250
250
< v-text-field class ="py-2 px-1 " color ="primary " v-model ="agentStore.card.title " label ="Title "
251
251
variant ="plain " hideDetails placeholder ="Title " autofocus
252
- @keyup.enter ="agentStore.saveCard(agentStore.card ) "> </ v-text-field >
252
+ @keyup.enter ="agentStore.saveCard() "> </ v-text-field >
253
253
< v-divider > </ v-divider >
254
254
< v-textarea v-model ="agentStore.card.description " class ="px-2 py-1 " variant ="plain "
255
255
placeholder ="Description " hide-details > </ v-textarea >
@@ -258,7 +258,7 @@ <h5 class="font-weight-bold">{{ column.key }}</h5>
258
258
< v-card-actions class ="pa-4 ">
259
259
< v-btn variant ="outlined " @click ="settingStore.editDialog = false "> Cancel</ v-btn >
260
260
< v-spacer > </ v-spacer >
261
- < v-btn variant ="flat " color ="primary " @click ="agentStore.saveCard(agentStore.card ) "> Save</ v-btn >
261
+ < v-btn variant ="flat " color ="primary " @click ="agentStore.saveCard() "> Save</ v-btn >
262
262
</ v-card-actions >
263
263
</ v-card >
264
264
</ v-dialog >
@@ -610,14 +610,19 @@ <h5 class="font-weight-bold">{{ column.key }}</h5>
610
610
agentStore . card = { ...card }
611
611
settingStore . editDialog = true ;
612
612
} ,
613
- saveCard ( editCard ) {
614
- let targetCard = cards . value . find ( ( card ) => card . id === editCard . id ) ;
615
- console . log ( "Target" , targetCard , editCard . id ) ;
616
- if ( targetCard ) {
617
- targetCard . title = editCard . title ;
618
- targetCard . description = editCard . description ;
619
- settingStore . editDialog = false ;
613
+ saveCard ( ) {
614
+ const editCard = this . card
615
+ if ( editCard ) {
616
+ let foundCard = this . columns
617
+ . flatMap ( column => column . cards )
618
+ . find ( card => card . id === this . card . id ) ;
619
+ if ( foundCard ) {
620
+ foundCard . title = editCard . title ;
621
+ foundCard . description = editCard . description ;
622
+ settingStore . editDialog = false ;
623
+ }
620
624
}
625
+
621
626
} ,
622
627
initAgent ( ) {
623
628
const states = ref ( [ "PROMPT" , "AGENT1" , "AGENT2" ] ) ;
@@ -889,7 +894,7 @@ <h5 class="font-weight-bold">{{ column.key }}</h5>
889
894
url : [ "https://api.openai.com" ,
890
895
"http://127.0.0.1" ,
891
896
"https://api.deepinfra.com" ,
892
- "https://console.anthropic .com" ] ,
897
+ "https://api.aiql .com" ] ,
893
898
path : [ "/v1/chat/completions" ,
894
899
"/v1/openai/chat/completions" ,
895
900
"/openai/v1/chat/completions" ] ,
0 commit comments