File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -300,18 +300,19 @@ export default class RichEditorPlugin extends AdminForthPlugin {
300
300
currentVal = currentVal . slice ( - promptLimit ) ;
301
301
}
302
302
303
+ const fieldLabel = this . resourceConfig ?. columns . find ( c => c . name === this . options . htmlFieldName ) ?. label || this . options . htmlFieldName ;
303
304
const resLabel = this . resourceConfig ! . label ;
304
-
305
+
305
306
let content ;
306
307
307
308
if ( currentVal ) {
308
- content = `Continue writing for text/string field "${ this . options . htmlFieldName } " in the table "${ resLabel } "\n` +
309
+ content = `Continue writing for text/string field "${ fieldLabel } " in the table "${ resLabel } "\n` +
309
310
( Object . keys ( recordNoField ) . length > 0 ? `Record has values for the context: ${ inputContext } \n` : '' ) +
310
311
`Current field value: ${ currentVal } \n` +
311
312
"Don't talk to me. Just write text. No quotes. Don't repeat current field value, just write completion\n" ;
312
313
313
314
} else {
314
- content = `Fill text/string field "${ this . options . htmlFieldName } " in the table "${ resLabel } "\n` +
315
+ content = `Fill text/string field "${ fieldLabel } " in the table "${ resLabel } "\n` +
315
316
( Object . keys ( recordNoField ) . length > 0 ? `Record has values for the context: ${ inputContext } \n` : '' ) +
316
317
"Be short, clear and precise. No quotes. Don't talk to me. Just write text\n" ;
317
318
}
You can’t perform that action at this time.
0 commit comments