Merge branch dev/bug-65956 of zentao/zentaopms (#11765)
This commit is contained in:
@@ -931,7 +931,11 @@ class ai extends control
|
||||
$prompt->id = $promptID;
|
||||
$prompt->module = $module;
|
||||
$prompt->targetForm = $targetForm;
|
||||
return $this->send(array('data' => $this->ai->getTestingLocation($prompt)));
|
||||
|
||||
$location = $this->ai->getTestingLocation($prompt);
|
||||
if($location === false) return $this->send(array('error' => $this->lang->ai->prompts->goingTestingFail));
|
||||
|
||||
return $this->send(array('data' => $location));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,6 +3,10 @@ window.getTestingLocation = function(id, module, targetForm)
|
||||
$.get($.createLink('ai', 'ajaxGetTestingLocation', `promptID=${id}&module=${module}&targetForm=${targetForm}`), function(response)
|
||||
{
|
||||
const res = JSON.parse(response);
|
||||
loadPage(res.data);
|
||||
if (res.data) {
|
||||
loadPage(res.data);
|
||||
} else if (res.error) {
|
||||
zui.Messager.show({content: res.error, type: 'danger'});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ $lang->ai->prompts->promptPreview = 'Purpose ZenTao Agent Preview';
|
||||
$lang->ai->prompts->selectTargetForm = 'Select Target Form';
|
||||
$lang->ai->prompts->selectTargetFormTip = 'Results returned from LLMs can be directly inputed into forms within ZenTao.';
|
||||
$lang->ai->prompts->goingTesting = 'Redirecting to testing page';
|
||||
$lang->ai->prompts->goingTestingFail = 'Unable to go testing, no suitable object found.';
|
||||
$lang->ai->prompts->goingTestingFail = 'No testable object available.';
|
||||
|
||||
/* Finalize page. */
|
||||
$lang->ai->moduleDisableTip = 'Module is automatically selected based on selected objects.';
|
||||
|
||||
@@ -195,7 +195,7 @@ $lang->ai->prompts->promptPreview = 'Purpose ZenTao Agent Preview';
|
||||
$lang->ai->prompts->selectTargetForm = 'Select Target Form';
|
||||
$lang->ai->prompts->selectTargetFormTip = 'Results returned from LLMs can be directly inputed into forms within ZenTao.';
|
||||
$lang->ai->prompts->goingTesting = 'Redirecting to testing page';
|
||||
$lang->ai->prompts->goingTestingFail = 'Unable to go testing, no suitable object found.';
|
||||
$lang->ai->prompts->goingTestingFail = 'No testable object available.';
|
||||
|
||||
/* Finalize page. */
|
||||
$lang->ai->moduleDisableTip = 'Module is automatically selected based on selected objects.';
|
||||
|
||||
@@ -195,7 +195,7 @@ $lang->ai->prompts->promptPreview = 'Purpose ZenTao Agent Preview';
|
||||
$lang->ai->prompts->selectTargetForm = 'Select Target Form';
|
||||
$lang->ai->prompts->selectTargetFormTip = 'Results returned from LLMs can be directly inputed into forms within ZenTao.';
|
||||
$lang->ai->prompts->goingTesting = 'Redirecting to testing page';
|
||||
$lang->ai->prompts->goingTestingFail = 'Unable to go testing, no suitable object found.';
|
||||
$lang->ai->prompts->goingTestingFail = 'No testable object available.';
|
||||
|
||||
/* Finalize page. */
|
||||
$lang->ai->moduleDisableTip = 'Module is automatically selected based on selected objects.';
|
||||
|
||||
@@ -195,7 +195,7 @@ $lang->ai->prompts->promptPreview = '操作禅道智能体预览';
|
||||
$lang->ai->prompts->selectTargetForm = '选择表单';
|
||||
$lang->ai->prompts->selectTargetFormTip = '选择后,可以将大语言模型返回的结果直接录入到禅道对应的表单中。';
|
||||
$lang->ai->prompts->goingTesting = '即将跳转至调试页面';
|
||||
$lang->ai->prompts->goingTestingFail = '无法去调试,找不到合适的对象';
|
||||
$lang->ai->prompts->goingTestingFail = '暂无可调试的对象';
|
||||
|
||||
/* Finalize page. */
|
||||
$lang->ai->moduleDisableTip = '系统根据所选对象自动关联分组';
|
||||
|
||||
Reference in New Issue
Block a user