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 {
108
108
currentVal = currentVal . slice ( - promptLimit ) ;
109
109
}
110
110
111
- // const resLabel = this.resourceConfig.label;
112
111
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 ;
114
113
115
114
let content ;
116
115
117
116
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` +
119
118
( Object . keys ( recordNoField ) . length > 0 ? `Record has values for the context: ${ inputContext } \n` : '' ) +
120
119
`Current field value: ${ currentVal } \n` +
121
120
"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 {
134
133
content = `${ interpretedPrompt } \n` +
135
134
"No quotes. Don't talk to me. Just write text\n" ;
136
135
} 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` +
138
137
( Object . keys ( recordNoField ) . length > 0 ? `Record has values for the context: ${ inputContext } \n` : '' ) +
139
138
"Be short, clear and precise. No quotes. Don't talk to me. Just write text\n" ;
140
139
}
You can’t perform that action at this time.
0 commit comments