+ final step of prompt creation, task #95122.
This commit is contained in:
@@ -275,6 +275,19 @@ class ai extends control
|
||||
{
|
||||
$prompt = $this->ai->getPromptByID($promptID);
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
$data = fixer::input('post')->get();
|
||||
|
||||
$prompt->name = $data->name;
|
||||
$prompt->desc = $data->desc;
|
||||
|
||||
$this->ai->updatePrompt($prompt);
|
||||
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->inlink('prompts') . '#app=admin'));
|
||||
}
|
||||
|
||||
$this->view->prompt = $prompt;
|
||||
$this->view->promptID = $promptID;
|
||||
$this->view->title = $this->lang->ai->prompts->finalize . " {$this->lang->colon} " . $this->lang->ai->prompts->common;
|
||||
|
||||
+25
-21
@@ -12,9 +12,10 @@ $lang->ai->common = 'AI';
|
||||
|
||||
/* Definitions of table columns, used to sprintf error messages to dao::$errors. */
|
||||
$lang->prompt = new stdclass();
|
||||
$lang->prompt->name = 'Name';
|
||||
$lang->prompt->desc = 'Description';
|
||||
$lang->prompt->model = 'Model';
|
||||
$lang->prompt->name = 'Name';
|
||||
$lang->prompt->desc = 'Description';
|
||||
$lang->prompt->model = 'Model';
|
||||
$lang->prompt->module = 'Module';
|
||||
|
||||
$lang->ai->nextStep = 'Next';
|
||||
|
||||
@@ -66,6 +67,9 @@ $lang->ai->prompts->promptPreview = 'Purpose Prompt Preview';
|
||||
$lang->ai->prompts->selectTargetForm = 'Select Target Form';
|
||||
$lang->ai->prompts->selectTargetFormTip = 'Results returned from LLMs can be directly inputed into forms within ZenTao.';
|
||||
|
||||
/* Finalize page. */
|
||||
$lang->ai->moduleDisableTip = 'Module is automatically selected based on selected objects.';
|
||||
|
||||
/* Data source definition. */
|
||||
$lang->ai->dataSource = array();
|
||||
$lang->ai->dataSource['story']['common'] = 'Story';
|
||||
@@ -174,27 +178,27 @@ $lang->ai->designStepNav['setpurpose'] = 'Confirm Action';
|
||||
$lang->ai->designStepNav['settargetform'] = 'Process Result';
|
||||
$lang->ai->designStepNav['finalize'] = 'Ready to Publish';
|
||||
|
||||
$lang->ai->dataTypeDesc = '%s ist die art %s, %s';
|
||||
$lang->ai->dataTypeDesc = '%s is %s type, %s';
|
||||
|
||||
$lang->ai->dataType = new stdclass();
|
||||
$lang->ai->dataType->pri = new stdClass();
|
||||
$lang->ai->dataType->pri->type = 'Nummer';
|
||||
$lang->ai->dataType->pri->desc = '1 ist die höchste Priorität, 4 ist die niedrigste Priorität.';
|
||||
$lang->ai->dataType->pri->type = 'numeric';
|
||||
$lang->ai->dataType->pri->desc = '1 is the highest priority, 4 is the lowest priority.';
|
||||
|
||||
$lang->ai->dataType->estimate = new stdClass();
|
||||
$lang->ai->dataType->estimate->type = 'Nummer';
|
||||
$lang->ai->dataType->estimate->desc = 'in Stunden.';
|
||||
$lang->ai->dataType->estimate->type = 'numeric';
|
||||
$lang->ai->dataType->estimate->desc = 'Unit is in hours.';
|
||||
|
||||
$lang->ai->dataType->consumed = $lang->ai->dataType->estimate;
|
||||
$lang->ai->dataType->left = $lang->ai->dataType->estimate;
|
||||
|
||||
$lang->ai->dataType->progress = new stdClass();
|
||||
$lang->ai->dataType->progress->type = 'Prozent';
|
||||
$lang->ai->dataType->progress->desc = '0 bedeutet "nicht begonnen", 100 bedeutet "abgeschlossen" .';
|
||||
$lang->ai->dataType->progress->type = 'percentage';
|
||||
$lang->ai->dataType->progress->desc = '0 means not started, 100 means completed.';
|
||||
|
||||
$lang->ai->dataType->datetime = new stdClass();
|
||||
$lang->ai->dataType->datetime->type = 'Datum & Zeit';
|
||||
$lang->ai->dataType->datetime->desc = 'im Format: 1970-01-01 00:00:01, oder leer lassen.';
|
||||
$lang->ai->dataType->datetime->type = 'datetime';
|
||||
$lang->ai->dataType->datetime->desc = 'Format is: 1970-01-01 00:00:01, or leave it blank.';
|
||||
|
||||
$lang->ai->dataType->estStarted = $lang->ai->dataType->datetime;
|
||||
$lang->ai->dataType->realStarted = $lang->ai->dataType->datetime;
|
||||
@@ -204,9 +208,9 @@ $lang->ai->demoData = new stdclass();
|
||||
$lang->ai->demoData->story = array(
|
||||
'story' => array
|
||||
(
|
||||
'title' => 'Entwicklung einer Online-Lernplattform',
|
||||
'spec' => 'Wir müssen eine Online-Lernplattform entwickeln, die Funktionen wie Kursverwaltung, Studentenverwaltung, Lehrerverwaltung usw. bietet.',
|
||||
'verify' => '1. Alle Funktionen können ordnungsgemäß ohne offensichtliche Fehler oder Abnormalitäten ausgeführt werden.2. Die Benutzeroberfläche ist ästhetisch ansprechend und benutzerfreundlich.3. Die Plattform kann den Bedürfnissen der Benutzer gerecht werden und hat einen hohen Grad an Benutzerzufriedenheit.4. Der Code hat eine gute Qualität, mit klarer Struktur und einfacher Wartung.',
|
||||
'title' => 'Develop an online learning platform',
|
||||
'spec' => 'We need to develop an online learning platform that provides course management, student management, teacher management, and other functions.',
|
||||
'verify' => '1. All functions can operate properly without any obvious errors or abnormalities.2. The interface is aesthetically pleasing and user-friendly.3. The platform can meet user needs and has a high level of user satisfaction.4. The code has good quality, with clear structure and easy maintenance.',
|
||||
'module' => 7,
|
||||
'pri' => 1,
|
||||
'estimate' => 1,
|
||||
@@ -217,14 +221,14 @@ $lang->ai->demoData->story = array(
|
||||
$lang->ai->demoData->execution = array
|
||||
(
|
||||
'execution' => array(
|
||||
'name' => 'Softwareentwicklung für die Online-Lernplattform',
|
||||
'desc' => 'Dieses Projekt zielt darauf ab, eine Software für eine Online-Lernplattform zu entwickeln, die zugängliche Lernressourcen wie Texte, Videos, Audios usw. sowie einige Lernwerkzeuge wie Prüfungen, Tests und Diskussionsforen bietet.',
|
||||
'name' => 'Online Learning Platform Software Development',
|
||||
'desc' => 'This plan aims to develop an online learning platform software that provides accessible learning resources, including text, video, and audio, as well as some learning tools such as exams, tests, and discussion forums.',
|
||||
'estimate' => 7,
|
||||
),
|
||||
'tasks' => array(
|
||||
0 =>
|
||||
array(
|
||||
'name' => 'Technologieauswahl',
|
||||
'name' => 'Technology Selection',
|
||||
'pri' => 1,
|
||||
'status' => 'done',
|
||||
'estimate' => 1,
|
||||
@@ -234,11 +238,11 @@ $lang->ai->demoData->execution = array
|
||||
'estStarted' => '2023-07-02 00:00:00',
|
||||
'realStarted' => '2023-07-02 00:00:00',
|
||||
'finishedDate' => '2023-07-02 00:00:00',
|
||||
'closedReason' => 'Erledigt',
|
||||
'closedReason' => 'Completed',
|
||||
),
|
||||
1 =>
|
||||
array(
|
||||
'name' => 'UI-Design',
|
||||
'name' => 'UI Design',
|
||||
'pri' => 1,
|
||||
'status' => 'doing',
|
||||
'estimate' => 2,
|
||||
@@ -252,7 +256,7 @@ $lang->ai->demoData->execution = array
|
||||
),
|
||||
2 =>
|
||||
array(
|
||||
'name' => 'Entwicklung',
|
||||
'name' => 'Development',
|
||||
'pri' => 1,
|
||||
'status' => 'wait',
|
||||
'estimate' => 1,
|
||||
|
||||
@@ -12,9 +12,10 @@ $lang->ai->common = 'AI';
|
||||
|
||||
/* Definitions of table columns, used to sprintf error messages to dao::$errors. */
|
||||
$lang->prompt = new stdclass();
|
||||
$lang->prompt->name = 'Name';
|
||||
$lang->prompt->desc = 'Description';
|
||||
$lang->prompt->model = 'Model';
|
||||
$lang->prompt->name = 'Name';
|
||||
$lang->prompt->desc = 'Description';
|
||||
$lang->prompt->model = 'Model';
|
||||
$lang->prompt->module = 'Module';
|
||||
|
||||
$lang->ai->nextStep = 'Next';
|
||||
|
||||
@@ -66,6 +67,9 @@ $lang->ai->prompts->promptPreview = 'Purpose Prompt Preview';
|
||||
$lang->ai->prompts->selectTargetForm = 'Select Target Form';
|
||||
$lang->ai->prompts->selectTargetFormTip = 'Results returned from LLMs can be directly inputed into forms within ZenTao.';
|
||||
|
||||
/* Finalize page. */
|
||||
$lang->ai->moduleDisableTip = 'Module is automatically selected based on selected objects.';
|
||||
|
||||
/* Data source definition. */
|
||||
$lang->ai->dataSource = array();
|
||||
$lang->ai->dataSource['story']['common'] = 'Story';
|
||||
|
||||
+25
-21
@@ -12,9 +12,10 @@ $lang->ai->common = 'AI';
|
||||
|
||||
/* Definitions of table columns, used to sprintf error messages to dao::$errors. */
|
||||
$lang->prompt = new stdclass();
|
||||
$lang->prompt->name = 'Name';
|
||||
$lang->prompt->desc = 'Description';
|
||||
$lang->prompt->model = 'Model';
|
||||
$lang->prompt->name = 'Name';
|
||||
$lang->prompt->desc = 'Description';
|
||||
$lang->prompt->model = 'Model';
|
||||
$lang->prompt->module = 'Module';
|
||||
|
||||
$lang->ai->nextStep = 'Next';
|
||||
|
||||
@@ -66,6 +67,9 @@ $lang->ai->prompts->promptPreview = 'Purpose Prompt Preview';
|
||||
$lang->ai->prompts->selectTargetForm = 'Select Target Form';
|
||||
$lang->ai->prompts->selectTargetFormTip = 'Results returned from LLMs can be directly inputed into forms within ZenTao.';
|
||||
|
||||
/* Finalize page. */
|
||||
$lang->ai->moduleDisableTip = 'Module is automatically selected based on selected objects.';
|
||||
|
||||
/* Data source definition. */
|
||||
$lang->ai->dataSource = array();
|
||||
$lang->ai->dataSource['story']['common'] = 'Story';
|
||||
@@ -174,27 +178,27 @@ $lang->ai->designStepNav['setpurpose'] = 'Confirm Action';
|
||||
$lang->ai->designStepNav['settargetform'] = 'Process Result';
|
||||
$lang->ai->designStepNav['finalize'] = 'Ready to Publish';
|
||||
|
||||
$lang->ai->dataTypeDesc = '%s est de type %s, %s';
|
||||
$lang->ai->dataTypeDesc = '%s is %s type, %s';
|
||||
|
||||
$lang->ai->dataType = new stdclass();
|
||||
$lang->ai->dataType->pri = new stdClass();
|
||||
$lang->ai->dataType->pri->type = 'Nombre';
|
||||
$lang->ai->dataType->pri->desc = '1 est la priorité maximale, 4 est la priorité minimale.';
|
||||
$lang->ai->dataType->pri->type = 'numeric';
|
||||
$lang->ai->dataType->pri->desc = '1 is the highest priority, 4 is the lowest priority.';
|
||||
|
||||
$lang->ai->dataType->estimate = new stdClass();
|
||||
$lang->ai->dataType->estimate->type = 'Nombre';
|
||||
$lang->ai->dataType->estimate->desc = 'Unité en heures.';
|
||||
$lang->ai->dataType->estimate->type = 'numeric';
|
||||
$lang->ai->dataType->estimate->desc = 'Unit is in hours.';
|
||||
|
||||
$lang->ai->dataType->consumed = $lang->ai->dataType->estimate;
|
||||
$lang->ai->dataType->left = $lang->ai->dataType->estimate;
|
||||
|
||||
$lang->ai->dataType->progress = new stdClass();
|
||||
$lang->ai->dataType->progress->type = 'Pourcentage';
|
||||
$lang->ai->dataType->progress->desc = '0 indique non commencé, 100 indique terminé.';
|
||||
$lang->ai->dataType->progress->type = 'percentage';
|
||||
$lang->ai->dataType->progress->desc = '0 means not started, 100 means completed.';
|
||||
|
||||
$lang->ai->dataType->datetime = new stdClass();
|
||||
$lang->ai->dataType->datetime->type = 'Date et heure';
|
||||
$lang->ai->dataType->datetime->desc = 'Format : 1970-01-01 00:00:01, laisser vide s’il n’y en a pas.';
|
||||
$lang->ai->dataType->datetime->type = 'datetime';
|
||||
$lang->ai->dataType->datetime->desc = 'Format is: 1970-01-01 00:00:01, or leave it blank.';
|
||||
|
||||
$lang->ai->dataType->estStarted = $lang->ai->dataType->datetime;
|
||||
$lang->ai->dataType->realStarted = $lang->ai->dataType->datetime;
|
||||
@@ -204,9 +208,9 @@ $lang->ai->demoData = new stdclass();
|
||||
$lang->ai->demoData->story = array(
|
||||
'story' => array
|
||||
(
|
||||
'title' => 'Développer une plate-forme d\'apprentissage en ligne',
|
||||
'spec' => 'Nous devons développer une plate-forme d\'apprentissage en ligne qui offre des fonctionnalités de gestion de cours, d\'étudiants et d\'enseignants, etc.',
|
||||
'verify' => '1. Toutes les fonctions peuvent fonctionner correctement sans erreurs ni anomalies évidentes.2. L\'interface est esthétique et conviviale.3. La plateforme peut répondre aux besoins des utilisateurs et a un niveau élevé de satisfaction de l\'utilisateur.4. Le code a une bonne qualité, avec une structure claire et facile à entretenir.',
|
||||
'title' => 'Develop an online learning platform',
|
||||
'spec' => 'We need to develop an online learning platform that provides course management, student management, teacher management, and other functions.',
|
||||
'verify' => '1. All functions can operate properly without any obvious errors or abnormalities.2. The interface is aesthetically pleasing and user-friendly.3. The platform can meet user needs and has a high level of user satisfaction.4. The code has good quality, with clear structure and easy maintenance.',
|
||||
'module' => 7,
|
||||
'pri' => 1,
|
||||
'estimate' => 1,
|
||||
@@ -217,14 +221,14 @@ $lang->ai->demoData->story = array(
|
||||
$lang->ai->demoData->execution = array
|
||||
(
|
||||
'execution' => array(
|
||||
'name' => 'Développement de logiciel de plateforme d\'apprentissage en ligne',
|
||||
'desc' => 'Ce plan vise à développer un logiciel de plateforme d\'apprentissage en ligne qui fournira des ressources d\'apprentissage accessibles, y compris du texte, des vidéos et des fichiers audio, ainsi que des outils d\'apprentissage tels que des examens, des tests et des forums de discussion.',
|
||||
'name' => 'Online Learning Platform Software Development',
|
||||
'desc' => 'This plan aims to develop an online learning platform software that provides accessible learning resources, including text, video, and audio, as well as some learning tools such as exams, tests, and discussion forums.',
|
||||
'estimate' => 7,
|
||||
),
|
||||
'tasks' => array(
|
||||
0 =>
|
||||
array(
|
||||
'name' => 'Sélection de la technologie',
|
||||
'name' => 'Technology Selection',
|
||||
'pri' => 1,
|
||||
'status' => 'done',
|
||||
'estimate' => 1,
|
||||
@@ -234,11 +238,11 @@ $lang->ai->demoData->execution = array
|
||||
'estStarted' => '2023-07-02 00:00:00',
|
||||
'realStarted' => '2023-07-02 00:00:00',
|
||||
'finishedDate' => '2023-07-02 00:00:00',
|
||||
'closedReason' => 'terminé',
|
||||
'closedReason' => 'Completed',
|
||||
),
|
||||
1 =>
|
||||
array(
|
||||
'name' => 'Conception de l’interface utilisateur',
|
||||
'name' => 'UI Design',
|
||||
'pri' => 1,
|
||||
'status' => 'doing',
|
||||
'estimate' => 2,
|
||||
@@ -252,7 +256,7 @@ $lang->ai->demoData->execution = array
|
||||
),
|
||||
2 =>
|
||||
array(
|
||||
'name' => 'Développement',
|
||||
'name' => 'Development',
|
||||
'pri' => 1,
|
||||
'status' => 'wait',
|
||||
'estimate' => 1,
|
||||
|
||||
@@ -12,9 +12,10 @@ $lang->ai->common = 'AI';
|
||||
|
||||
/* Definitions of table columns, used to sprintf error messages to dao::$errors. */
|
||||
$lang->prompt = new stdclass();
|
||||
$lang->prompt->name = '名称';
|
||||
$lang->prompt->desc = '描述';
|
||||
$lang->prompt->model = '语言模型';
|
||||
$lang->prompt->name = '名称';
|
||||
$lang->prompt->desc = '描述';
|
||||
$lang->prompt->model = '语言模型';
|
||||
$lang->prompt->module = '所属分组';
|
||||
|
||||
$lang->ai->nextStep = '下一步';
|
||||
|
||||
@@ -66,6 +67,9 @@ $lang->ai->prompts->promptPreview = '操作提词预览';
|
||||
$lang->ai->prompts->selectTargetForm = '选择表单';
|
||||
$lang->ai->prompts->selectTargetFormTip = '选择后,可以将大语言模型返回的结果直接录入到禅道对应的表单中。';
|
||||
|
||||
/* Finalize page. */
|
||||
$lang->ai->moduleDisableTip = '系统根据所选对象自动关联分组';
|
||||
|
||||
/* Data source definition. */
|
||||
$lang->ai->dataSource = array();
|
||||
$lang->ai->dataSource['story']['common'] = '需求';
|
||||
|
||||
@@ -10,4 +10,60 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
|
||||
<style>
|
||||
.center-wrapper {display: flex; justify-content: center; height: 100%;}
|
||||
.center-content {width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center;}
|
||||
#info-form {display: flex; flex-direction: column; min-width: 800px;}
|
||||
.content-row {display: flex; flex-direction: row; padding: 8px 0px;}
|
||||
.input-label {width: 120px; padding: 6px 12px; text-align: right;}
|
||||
.input {flex-grow: 1;}
|
||||
.input-tip {padding: 6px 12px;}
|
||||
</style>
|
||||
|
||||
<?php include 'promptdesignprogressbar.html.php';?>
|
||||
<div id='mainContent' class='main-content' style='height: calc(100vh - 120px);'>
|
||||
<form class='load-indicator main-form form-ajax' method='post' style='height: 100%;'>
|
||||
<div class='center-wrapper'>
|
||||
<div class='center-content'>
|
||||
<div id='info-form'>
|
||||
<div class='content-row'>
|
||||
<div class='input-label'><span><?php echo $lang->prompt->name;?></span></div>
|
||||
<div class='input mw-600px'><?php echo html::input('name', $prompt->name, "class='form-control' required");?></div>
|
||||
</div>
|
||||
<div class='content-row'>
|
||||
<div class='input-label'><span><?php echo $lang->prompt->module;?></span></div>
|
||||
<div class='input mw-200px'><?php echo html::input('module', $lang->ai->prompts->modules[$prompt->module], "class='form-control' disabled");?></div>
|
||||
<div class='input-tip text-gray'><?php echo $lang->ai->moduleDisableTip;?></div>
|
||||
</div>
|
||||
<div class='content-row'>
|
||||
<div class='input-label'><span><?php echo $lang->prompt->desc;?></span></div>
|
||||
<div class='input mw-600px'><?php echo html::textarea('desc', $prompt->desc, "rows='6' class='form-control'");?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div style='display: flex; flex-grow: 1; flex-direction: column-reverse;'>
|
||||
<div style='display: flex; justify-content: center;'><?php echo html::submitButton($lang->ai->nextStep, 'disabled');?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('input[name="name"]').on('input', function()
|
||||
{
|
||||
if($(this).val().length > 0)
|
||||
{
|
||||
$('button[type="submit"]').removeAttr('disabled');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('button[type="submit"]').attr('disabled', 'disabled');
|
||||
}
|
||||
});
|
||||
$('input[name="name"]').trigger('input');
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user