From 12e8a2d43b97da3ec4ad49e6a559865701092439 Mon Sep 17 00:00:00 2001 From: Chenjianyu Date: Mon, 3 Jul 2023 15:30:30 +0800 Subject: [PATCH] * add step variable. --- module/ai/control.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/module/ai/control.php b/module/ai/control.php index 7c143c3b71..0dce35dec7 100644 --- a/module/ai/control.php +++ b/module/ai/control.php @@ -161,6 +161,7 @@ class ai extends control return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->inlink('promptSelectDataSource', "promptID=$promptID") . '#app=admin')); } + $this->view->step = 'role'; $this->view->prompt = $prompt; $this->view->promptID = $promptID; $this->view->title = $this->lang->ai->prompts->assignRole . " {$this->lang->colon} " . $this->lang->ai->prompts->common; @@ -192,6 +193,7 @@ class ai extends control return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->inlink('promptSetPurpose', "promptID=$promptID") . '#app=admin')); } + $this->view->step = 'data'; $this->view->activeDataSource = empty($prompt->module) ? 'story' : $prompt->module; $this->view->dataSource = $this->config->ai->dataSource; $this->view->prompt = $prompt; @@ -225,10 +227,11 @@ class ai extends control return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->inlink('promptSetTargetForm', "promptID=$promptID") . '#app=admin')); } + $this->view->step = 'purpose'; $this->view->dataPreview = ''; // TODO: Provide data preview with model method. $this->view->prompt = $prompt; $this->view->promptID = $promptID; - $this->view->title = $this->lang->ai->prompts->setPurpose . " {$this->lang->colon} " . $this->lang->ai->prompts->common; + $this->view->title = $this->lang->ai->prompts->setPurpose . " {$this->lang->colon} " . $this->lang->ai->prompts->common; $this->view->position[] = $this->lang->ai->prompts->common; $this->display(); } @@ -242,6 +245,7 @@ class ai extends control */ public function promptSetTargetForm($promptID) { + $this->view->step = 'target'; $this->view->promptID = $promptID; $this->view->title = $this->lang->ai->prompts->setTargetForm . " {$this->lang->colon} " . $this->lang->ai->prompts->common; $this->view->position[] = $this->lang->ai->prompts->common; @@ -257,6 +261,7 @@ class ai extends control */ public function promptFinalize($promptID) { + $this->view->step = 'finalize'; $this->view->promptID = $promptID; $this->view->title = $this->lang->ai->prompts->finalize . " {$this->lang->colon} " . $this->lang->ai->prompts->common; $this->view->position[] = $this->lang->ai->prompts->common;