* use data preview in target form setting.

This commit is contained in:
liwenrui
2023-07-06 15:48:53 +08:00
parent 3f64497183
commit 53bf8021eb
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -256,7 +256,7 @@ class ai extends control
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->inlink('promptFinalize', "promptID=$promptID") . '#app=admin'));
}
$this->view->dataPreview = ''; // TODO: Provide data preview with model method.
$this->view->dataPreview = $this->ai->generateDemoDataPrompt($prompt->module, $prompt->source);
$this->view->prompt = $prompt;
$this->view->promptID = $promptID;
$this->view->title = $this->lang->ai->prompts->setTargetForm . " {$this->lang->colon} " . $this->lang->ai->prompts->common;
+1 -1
View File
@@ -110,7 +110,7 @@ customElements.define('prompt-previewer', PromptPreviewer, {extends: 'div'});
<div id='prompt-preview'>
<div class='prompt-data'>
<div class='block-header text-gray'><?php echo $lang->ai->prompts->dataPreview;?></div>
<div class='block-content code' style='white-space: pre-wrap; word-break: break-word'><?php echo $dataPreview;?></div>
<div class='block-content code' style='white-space: pre-wrap; word-break: break-word;'><?php echo $dataPreview;?></div>
</div>
<div class='prompt-role'>
<div class='block-header text-gray'><?php echo $lang->ai->prompts->rolePreview;?></div>
+1 -1
View File
@@ -76,7 +76,7 @@
<div id='prompt-preview'>
<div class='prompt-data'>
<div class='block-header text-gray'><?php echo $lang->ai->prompts->dataPreview;?></div>
<div class='block-content code' style='white-space: pre;'><?php echo $dataPreview;?></div>
<div class='block-content code' style='white-space: pre-wrap; word-break: break-word;'><?php echo $dataPreview;?></div>
</div>
<div class='prompt-role'>
<div class='block-header text-gray'><?php echo $lang->ai->prompts->rolePreview;?></div>