Skip to content

Commit f28031d

Browse files
committed
feat: add description to the prompt & description fields
1 parent 1ca1a92 commit f28031d

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

assets/components/modai/mgr/js/context_provider/panel.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ Ext.extend(modAIAdmin.panel.ContextProvider, MODx.FormPanel, {
164164
value: config.record.description,
165165
allowBlank: true,
166166
},
167+
{
168+
xtype: 'label',
169+
html: _('modai.admin.context_provider.description_desc'),
170+
cls: 'desc-under',
171+
},
167172
],
168173
},
169174

assets/components/modai/mgr/js/tool/panel.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,17 @@ Ext.extend(modAIAdmin.panel.Tool, MODx.FormPanel, {
253253
value: config.record.description,
254254
allowBlank: true,
255255
},
256-
this.promptField
256+
{
257+
xtype: 'label',
258+
html: _('modai.admin.tool.description_desc'),
259+
cls: 'desc-under',
260+
},
261+
this.promptField,
262+
{
263+
xtype: 'label',
264+
html: _('modai.admin.tool.prompt_desc'),
265+
cls: 'desc-under',
266+
},
257267
],
258268
},
259269

core/components/modai/lexicon/en/default.inc.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
$_lang['modai.admin.context_provider.name'] = 'Name';
1515
$_lang['modai.admin.context_provider.description'] = 'Description';
16+
$_lang['modai.admin.context_provider.description_desc'] = 'Internal description of the context provider.';
1617
$_lang['modai.admin.context_provider.enabled'] = 'Enabled';
1718
$_lang['modai.admin.context_provider.enabled_desc'] = 'If disabled, context provider won\'t augument the prompt.';
1819
$_lang['modai.admin.context_provider.create'] = 'Create Context Provider';
@@ -29,6 +30,7 @@
2930

3031
$_lang['modai.admin.tool.name'] = 'Name';
3132
$_lang['modai.admin.tool.description'] = 'Description';
33+
$_lang['modai.admin.tool.description_desc'] = 'Internal description of the tool.';
3234
$_lang['modai.admin.tool.enabled'] = 'Enabled';
3335
$_lang['modai.admin.tool.enabled_desc'] = 'If disabled, tool won\'t be available for the model.';
3436
$_lang['modai.admin.tool.default'] = 'Default';
@@ -46,6 +48,7 @@
4648
$_lang['modai.admin.tool.tool'] = 'Tool';
4749
$_lang['modai.admin.tool.agents'] = 'Agents';
4850
$_lang['modai.admin.tool.prompt'] = 'Prompt';
51+
$_lang['modai.admin.tool.prompt_desc'] = 'Description of the tool to the AI. By default it uses the default from the tool\'s class, but you can override it and customize.';
4952

5053
$_lang['modai.admin.agent.name'] = 'Name';
5154
$_lang['modai.admin.agent.description'] = 'Description';

0 commit comments

Comments
 (0)