File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -108,14 +108,13 @@ export default class TextCompletePlugin extends AdminForthPlugin {
108108 currentVal = currentVal . slice ( - promptLimit ) ;
109109 }
110110
111- // const resLabel = this.resourceConfig.label;
112111 const fieldLabel = this . resourceConfig ?. columns . find ( c => c . name === this . options . fieldName ) ?. label || this . options . fieldName ;
113- const resourceLabel = this . resourceConfig ? .label || this . resourceConfig ?. resourceId ;
112+ const resLabel = this . resourceConfig ! . label ;
114113
115114 let content ;
116115
117116 if ( currentVal ) {
118- content = `Continue writing for text/string field "${ fieldLabel } " in the table "${ resourceLabel } "\n` +
117+ content = `Continue writing for text/string field "${ fieldLabel } " in the table "${ resLabel } "\n` +
119118 ( Object . keys ( recordNoField ) . length > 0 ? `Record has values for the context: ${ inputContext } \n` : '' ) +
120119 `Current field value: ${ currentVal } \n` +
121120 "Don't talk to me. Just write text. No quotes. Don't repeat current field value, just write completion\n" ;
@@ -134,7 +133,7 @@ export default class TextCompletePlugin extends AdminForthPlugin {
134133 content = `${ interpretedPrompt } \n` +
135134 "No quotes. Don't talk to me. Just write text\n" ;
136135 } else {
137- content = `Fill text/string field "${ fieldLabel } " in the table "${ resourceLabel } "\n` +
136+ content = `Fill text/string field "${ fieldLabel } " in the table "${ resLabel } "\n` +
138137 ( Object . keys ( recordNoField ) . length > 0 ? `Record has values for the context: ${ inputContext } \n` : '' ) +
139138 "Be short, clear and precise. No quotes. Don't talk to me. Just write text\n" ;
140139 }
You can’t perform that action at this time.
0 commit comments