Repository: 1Panel-dev/MaxKB
Pull request #2573: feat: Update function setting style
Author: login: wangdan-fit2cloud
Labels: name: do-not-merge/release-note-label-needed
Created: 2025-03-17T06:04:11Z | Merged: 2025-03-17T06:04:25Z

#### What this PR does / why we need it?

#### Summary of your change

#### Please indicate you've done the following:

- [ ] Made sure tests are passing and test coverage is added if needed.
- [ ] Made sure commit message follow the rule of [Conventional Commits specification](https://www.conventionalcommits.org/).
- [ ] Considered the docs impact and opened a new docs issue or PR with docs changes if needed.


Diff:
diff --git a/ui/src/locales/lang/zh-CN/views/function-lib.ts b/ui/src/locales/lang/zh-CN/views/function-lib.ts
index ac6c00dce66..b0767b6448b 100644
--- a/ui/src/locales/lang/zh-CN/views/function-lib.ts
+++ b/ui/src/locales/lang/zh-CN/views/function-lib.ts
@@ -30,7 +30,7 @@ export default {
     },
     form: {
       functionName: {
-        label: '函数名称',
+        label: '名称',
         placeholder: '请输入函数名称',
         requiredMessage: '请输入函数名称'
       },
diff --git a/ui/src/locales/lang/zh-Hant/views/function-lib.ts b/ui/src/locales/lang/zh-Hant/views/function-lib.ts
index 6b4a9b3392d..789cbf0ec4d 100644
--- a/ui/src/locales/lang/zh-Hant/views/function-lib.ts
+++ b/ui/src/locales/lang/zh-Hant/views/function-lib.ts
@@ -30,7 +30,7 @@ export default {
     },
     form: {
       functionName: {
-        label: '函數名稱',
+        label: '名稱',
         placeholder: '請輸入函數名稱',
         requiredMessage: '請輸入函數名稱'
       },
diff --git a/ui/src/utils/application.ts b/ui/src/utils/application.ts
index 4666da70b84..fd7d0a201bc 100644
--- a/ui/src/utils/application.ts
+++ b/ui/src/utils/application.ts
@@ -1,7 +1,7 @@
 export const defaultIcon = '/ui/favicon.ico'
 
 // 是否显示字母 / icon
-export function isAppIcon(url: string | undefined) {
+export function isAppIcon(url: String | undefined) {
   return url === defaultIcon ? '' : url
 }
 
diff --git a/ui/src/views/application/component/ParamSettingDialog.vue b/ui/src/views/application/component/ParamSettingDialog.vue
index 69828a107ed..2d58be74955 100644
--- a/ui/src/views/application/component/ParamSettingDialog.vue
+++ b/ui/src/views/application/component/ParamSettingDialog.vue
@@ -131,32 +131,29 @@
                   v-model="form.dataset_setting.no_references_setting.status"
                   class="radio-block"
                 >
-                  <div>
-                    <el-radio value="ai_questioning">
-                      <p>
-                        {{ $t('views.application.applicationForm.dialog.continueQuestioning') }}
-                      </p>
-                    </el-radio>
-                  </div>
-                  <div>
-                    <el-radio value="designated_answer">
-                      <p>{{ $t('views.application.applicationForm.dialog.provideAnswer') }}</p>
-                      <el-form-item
-                        v-if="
-                          form.dataset_setting.no_references_setting.status === 'designated_answer'
-                        "
-                        prop="designated_answer"
-                      >
-                        <el-input
-                          v-model="noReferencesform.designated_answer"
-                          :rows="2"
-                          type="textarea"
-                          maxlength="2048"
-                          :placeholder="defaultValue['designated_answer']"
-                        />
-                      </el-form-item>
-                    </el-radio>
-                  </div>
+                  <el-radio value="ai_questioning">
+                    <p>
+                      {{ $t('views.application.applicationForm.dialog.continueQuestioning') }}
+                    </p>
+                  </el-radio>
+
+                  <el-radio value="designated_answer">
+                    <p>{{ $t('views.application.applicationForm.dialog.provideAnswer') }}</p>
+                    <el-form-item
+                      v-if="
+                        form.dataset_setting.no_references_setting.status === 'designated_answer'
+                      "
+                      prop="designated_answer"
+                    >
+                      <el-input
+                        v-model="noReferencesform.designated_answer"
+                        :rows="2"
+                        type="textarea"
+                        maxlength="2048"
+                        :placeholder="defaultValue['designated_answer']"
+                      />
+                    </el-form-item>
+                  </el-radio>
                 </el-radio-group>
               </el-form>
             </el-form-item>
diff --git a/ui/src/views/function-lib/component/EditAvatarDialog.vue b/ui/src/views/function-lib/component/EditAvatarDialog.vue
index 21c96c4cd77..8a1c4bec017 100644
--- a/ui/src/views/function-lib/component/EditAvatarDialog.vue
+++ b/ui/src/views/function-lib/component/EditAvatarDialog.vue
@@ -1,6 +1,6 @@
 <template>
   <el-dialog
-      :title="$t('views.applicationOverview.appInfo.EditAvatarDialog.title')"
+      :title="`Logo ${$t('common.setting')}`"
       v-model="dialogVisible"
       :close-on-click-modal="false"
       :close-on-press-escape="false"
diff --git a/ui/src/views/function-lib/component/FunctionFormDrawer.vue b/ui/src/views/function-lib/component/FunctionFormDrawer.vue
index 0e075608a8d..367348278c9 100644
--- a/ui/src/views/function-lib/component/FunctionFormDrawer.vue
+++ b/ui/src/views/function-lib/component/FunctionFormDrawer.vue
@@ -20,47 +20,54 @@
           :label="$t('views.functionLib.functionForm.form.functionName.label')"
           prop="name"
         >
-          <div v-if="form.id"
-            class="edit-avatar mr-12"
-            @mouseenter="showEditIcon = true"
-            @mouseleave="showEditIcon = false"
-          >
-            <AppAvatar
-              v-if="isAppIcon(form.icon as string)"
-              :id="form.id"
-              shape="square"
-              :size="32"
-              style="background: none"
+          <div class="flex w-full">
+            <div
+              v-if="form.id"
+              class="edit-avatar mr-12"
+              @mouseenter="showEditIcon = true"
+              @mouseleave="showEditIcon = false"
             >
-              <img :src="form.icon as string" alt="" />
+              <AppAvatar
+                v-if="isAppIcon(form.icon)"
+                :id="form.id"
+                shape="square"
+                :size="32"
+                style="background: none"
+              >
+                <img :src="String(form.icon)" alt="" />
+              </AppAvatar>
+              <AppAvatar
+                v-else-if="form.name"
+                :id="form.id"
+                :name="form.name"
+                pinyinColor
+                shape="square"
+                :size="32"
+              />
+              <AppAvatar
+                v-if="showEditIcon"
+                :id="form.id"
+                shape="square"
+                class="edit-mask"
+                :size="32"
+                @click="openEditAvatar"
+              >
+                <el-icon><EditPen /></el-icon>
+              </AppAvatar>
+            </div>
+            <AppAvatar shape="square" style="background: #34c724" class="mr-12" v-else>
+              <img src="@/assets/icon_function_outlined.svg" style="width: 75%" alt="" />
             </AppAvatar>
-            <AppAvatar
-              v-else-if="form.name"
-              :id="form.id"
-              :name="form.name"
-              pinyinColor
-              shape="square"
-              :size="32"
+            <el-input
+              v-model="form.name"
+              :placeholder="$t('views.functionLib.functionForm.form.functionName.placeholder')"
+              maxlength="64"
+              show-word-limit
+              @blur="form.name = form.name?.trim()"
             />
-            <AppAvatar
-              v-if="showEditIcon"
-              :id="form.id"
-              shape="square"
-              class="edit-mask"
-              :size="32"
-              @click="openEditAvatar"
-            >
-              <el-icon><EditPen /></el-icon>
-            </AppAvatar>
           </div>
-          <el-input
-            v-model="form.name"
-            :placeholder="$t('views.functionLib.functionForm.form.functionName.placeholder')"
-            maxlength="64"
-            show-word-limit
-            @blur="form.name = form.name?.trim()"
-          />
         </el-form-item>
+
         <el-form-item :label="$t('views.functionLib.functionForm.form.functionDescription.label')">
           <el-input
             v-model="form.desc"
@@ -72,7 +79,7 @@
             @blur="form.desc = form.desc?.trim()"
           />
         </el-form-item>
-<!--
+        <!--
         <el-form-item prop="permission_type">
           <template #label>
             <span>{{ $t('views.functionLib.functionForm.form.permission_type.label') }}</span>
@@ -110,7 +117,7 @@
         </el-button>
       </div>
       <el-table :data="form.init_field_list" class="mb-16">
-        <el-table-column prop="field" :label="$t('dynamicsForm.paramForm.field.label')" >
+        <el-table-column prop="field" :label="$t('dynamicsForm.paramForm.field.label')">
           <template #default="{ row }">
             <span :title="row.field" class="ellipsis-1">{{ row.field }}</span>
           </template>
@@ -266,7 +273,7 @@
 
     <FunctionDebugDrawer ref="FunctionDebugDrawerRef" />
     <FieldFormDialog ref="FieldFormDialogRef" @refresh="refreshFieldList" />
-    <UserFieldFormDialog ref="UserFieldFormDialogRef" @refresh="refreshInitFieldList"/>
+    <UserFieldFormDialog ref="UserFieldFormDialogRef" @refresh="refreshInitFieldList" />
     <EditAvatarDialog ref="EditAvatarDialogRef" @refresh="refreshFunctionLib" />
   </el-drawer>
 </template>
@@ -283,8 +290,8 @@ import { cloneDeep } from 'lodash'
 import { PermissionType, PermissionDesc } from '@/enums/model'
 import { t } from '@/locales'
 import UserFieldFormDialog from '@/workflow/nodes/base-node/component/UserFieldFormDialog.vue'
-import {isAppIcon} from "@/utils/application";
-import EditAvatarDialog from "./EditAvatarDialog.vue";
+import { isAppIcon } from '@/utils/application'
+import EditAvatarDialog from './EditAvatarDialog.vue'
 
 const props = defineProps({
   title: String
@@ -402,7 +409,6 @@ function refreshFieldList(data: any) {
   currentIndex.value = null
 }
 
-
 function openAddInitDialog(data?: any, index?: any) {
   if (typeof index !== 'undefined') {
     currentIndex.value = index
@@ -434,7 +440,6 @@ function openEditAvatar() {
   EditAvatarDialogRef.value.open(form.value)
 }
 
-
 const submit = async (formEl: FormInstance | undefined) => {
   if (!formEl) return
   await formEl.validate((valid: any) => {
diff --git a/ui/src/views/function-lib/component/PermissionDialog.vue b/ui/src/views/function-lib/component/PermissionDialog.vue
index ca9104e9a2f..910afc6cd88 100644
--- a/ui/src/views/function-lib/component/PermissionDialog.vue
+++ b/ui/src/views/function-lib/component/PermissionDialog.vue
@@ -6,6 +6,7 @@
     :close-on-press-escape="false"
     :destroy-on-close="true"
     append-to-body
+    width="450"
   >
     <el-form
       label-position="top"
@@ -14,17 +15,20 @@
       :model="form"
       require-asterisk-position="right"
     >
-      <el-radio-group v-model="form.permission_type">
-        <el-radio value="PRIVATE">
+      <el-radio-group v-model="form.permission_type" class="radio-block">
+        <el-radio value="PRIVATE" size="large" class="mb-16">
           {{ $t('common.private') }}
-          {{ $t('views.template.templateForm.form.permissionType.privateDesc') }}
+          <el-text type="info">{{
+            $t('views.template.templateForm.form.permissionType.privateDesc')
+          }}</el-text>
         </el-radio>
-        <el-radio value="PUBLIC">
+        <el-radio value="PUBLIC" size="large">
           {{ $t('common.public') }}
-          {{ $t('views.template.templateForm.form.permissionType.publicDesc') }}
+          <el-text type="info">{{
+            $t('views.template.templateForm.form.permissionType.publicDesc')
+          }}</el-text>
         </el-radio>
       </el-radio-group>
-
     </el-form>
     <template #footer>
       <span class="dialog-footer">
@@ -44,7 +48,6 @@ import { t } from '@/locales'
 import functionLibApi from '@/api/function-lib'
 import { MsgSuccess } from '@/utils/message'
 
-
 const emit = defineEmits(['refresh'])
 
 const fieldFormRef = ref()
@@ -89,12 +92,11 @@ const submit = async (formEl: FormInstance | undefined) => {
   if (!formEl) return
   await formEl.validate((valid) => {
     if (valid) {
-      functionLibApi.putFunctionLib(form.value?.id as string, form.value, loading)
-        .then((res) => {
-          MsgSuccess(t('common.editSuccess'))
-          emit('refresh')
-          dialogVisible.value = false
-        })
+      functionLibApi.putFunctionLib(form.value?.id as string, form.value, loading).then((res) => {
+        MsgSuccess(t('common.editSuccess'))
+        emit('refresh')
+        dialogVisible.value = false
+      })
     }
   })
 }
diff --git a/ui/src/views/function-lib/index.vue b/ui/src/views/function-lib/index.vue
index d58165ebd22..37a6a330cbc 100644
--- a/ui/src/views/function-lib/index.vue
+++ b/ui/src/views/function-lib/index.vue
@@ -1,6 +1,6 @@
 <template>
   <div class="function-lib-list-container p-24" style="padding-top: 16px">
-    <el-tabs v-model="functionType" >
+    <el-tabs v-model="functionType">
       <el-tab-pane :label="$t('views.functionLib.title')" name="PUBLIC"></el-tab-pane>
       <el-tab-pane :label="$t('views.functionLib.internalTitle')" name="INTERNAL"></el-tab-pane>
     </el-tabs>
@@ -45,7 +45,15 @@
         :loading="loading"
       >
         <el-row :gutter="15">
-          <el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" class="mb-16" v-if="functionType === 'PUBLIC'">
+          <el-col
+            :xs="24"
+            :sm="12"
+            :md="8"
+            :lg="6"
+            :xl="6"
+            class="mb-16"
+            v-if="functionType === 'PUBLIC'"
+          >
             <el-card shadow="hover" class="application-card-add" style="--el-card-padding: 8px">
               <div class="card-add-button flex align-center cursor p-8" @click="openCreateDialog()">
                 <AppIcon iconName="app-add-application" class="mr-8"></AppIcon>
@@ -132,13 +140,16 @@
               </div>
               <template #footer>
                 <div class="footer-content flex-between">
-                  <div><span v-if="item.template_id"> {{ $t('common.author') }}: MaxKB</span></div>
+                  <div>
+                    <span v-if="item.template_id"> {{ $t('common.author') }}: MaxKB</span>
+                  </div>
                   <div @click.stop>
                     <el-switch
                       :disabled="item.permission_type === 'PUBLIC' && !canEdit(item)"
                       v-model="item.is_active"
                       @change="changeState($event, item)"
                       size="small"
+                      class="mr-4"
                     />
                     <el-dropdown trigger="click">
                       <el-button text @click.stop>
@@ -152,7 +163,7 @@
                             @click.stop="copyFunctionLib(item)"
                           >
                             <AppIcon iconName="app-copy"></AppIcon>
-                            {{$t('common.copy')}}
+                            {{ $t('common.copy') }}
                           </el-dropdown-item>
                           <el-dropdown-item
                             :disabled="item.permission_type === 'PUBLIC' && !canEdit(item)"
@@ -165,7 +176,7 @@
                             :disabled="item.permission_type === 'PUBLIC' && !canEdit(item)"
                             @click.stop="configPermission(item)"
                           >
-                            <AppIcon iconName="app-copy"></AppIcon>
+                            <el-icon><User /></el-icon>
                             {{ $t('views.functionLib.functionForm.form.permission_type.label') }}
                           </el-dropdown-item>
                           <el-dropdown-item
@@ -174,7 +185,7 @@
                             @click.stop="exportFunctionLib(item)"
                           >
                             <AppIcon iconName="app-export"></AppIcon>
-                            {{$t('common.export')}}
+                            {{ $t('common.export') }}
                           </el-dropdown-item>
                           <el-dropdown-item
                             :disabled="item.permission_type === 'PUBLIC' && !canEdit(item)"
@@ -218,11 +229,7 @@
                 />
               </template>
               <div class="status-button">
-                <el-tag
-                  class="info-tag"
-                  v-if="item.added"
-                  style="height: 22px"
-                >
+                <el-tag class="info-tag" v-if="item.added" style="height: 22px">
                   {{ $t('views.functionLib.added') }}</el-tag
                 >
               </div>
@@ -230,11 +237,7 @@
                 <div class="footer-content flex-between">
                   <div>{{ $t('common.author') }}: MaxKB</div>
                   <div @click.stop v-if="!item.added">
-                    <el-button
-                      type="primary"
-                      link
-                      @click="addInternalFunction(item)"
-                    >
+                    <el-button type="primary" link @click="addInternalFunction(item)">
                       {{ $t('common.add') }}
                     </el-button>
                   </div>
@@ -339,26 +342,24 @@ function openCreateDialog(data?: any) {
 
 function getImageUrl(name: string) {
   if (name.startsWith('/src/assets/fx/')) {
-    return internalIcons[name]?.default;
+    return internalIcons[name]?.default
   }
   return name
 }
 
-
 function openDescDrawer(row: any) {
   const index = row.icon.replace('icon.png', 'index.vue')
   internalDescComponent.value = internalDesc[index].default
-  nextTick(()=> {
-    internalDescRef.value?.open(row);
+  nextTick(() => {
+    internalDescRef.value?.open(row)
   })
 }
 
 function addInternalFunction(data?: any) {
-  functionLibApi.addInternalFunction(data.id, changeStateloading)
-    .then((res) => {
-      MsgSuccess(t('common.submitSuccess'))
-      searchHandle()
-    })
+  functionLibApi.addInternalFunction(data.id, changeStateloading).then((res) => {
+    MsgSuccess(t('common.submitSuccess'))
+    searchHandle()
+  })
 }
 
 function searchHandle() {
@@ -433,14 +434,13 @@ function copyFunctionLib(row: any) {
 }
 
 function exportFunctionLib(row: any) {
-  functionLibApi.exportFunctionLib(row.id, row.name, loading)
-    .catch((e: any) => {
-      if (e.response.status !== 403) {
-        e.response.data.text().then((res: string) => {
-          MsgError(`${t('views.application.tip.ExportError')}:${JSON.parse(res).message}`)
-        })
-      }
-    })
+  functionLibApi.exportFunctionLib(row.id, row.name, loading).catch((e: any) => {
+    if (e.response.status !== 403) {
+      e.response.data.text().then((res: string) => {
+        MsgError(`${t('views.application.tip.ExportError')}:${JSON.parse(res).message}`)
+      })
+    }
+  })
 }
 
 function configPermission(item: any) {


Reviews:
user: login: shaohuzhang1
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T06:04:31Z
user: login: shaohuzhang1
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T06:04:38Z
user: login: shaohuzhang1
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-17T06:04:41Z

Review comments:
diff_hunk: @@ -434,7 +440,6 @@ function openEditAvatar() {
   EditAvatarDialogRef.value.open(form.value)
 }
 
-
 const submit = async (formEl: FormInstance | undefined) => {
   if (!formEl) return
   await formEl.validate((valid: any) => {
path: ui/src/views/function-lib/component/FunctionFormDrawer.vue
user: login: shaohuzhang1
body: The code appears to be well-written and mostly functional, but there are a few minor issues that could potentially improve readability or performance:

1. **Use of `as` keyword**: In TypeScript, it's not recommended to use the `as` keyword for type assertions. You can directly assign types using the colon (`:`).

   ```typescript
   class A {}
   
   let a: A = new A() // Correct
   ```

2. **Unnecessary semicolons**: While semicolons at the end of statements are syntactically required, they do not need to be included unless absolutely necessary.

3. **Empty comment block**: The empty comment block between lines 105 and 106 doesn't contribute anything useful and should likely be removed.

4. **Unused variables**: It seems like some unused variables (`currentIndex`, `permissionTypes`, etc.) have been added without being used throughout the component.

Here is an optimized version of the relevant section with these improvements:

```vue
<template>
  <el-drawer
    v-model="drawerVisible"
    size="50%"
    @close="onCloseDrawer"
    append-to-body
  >
    <template #header slot-scope="{ close }">
      {{ title }}
      <el-button @click="close" style="float: right; padding: 0;">X</el-button>
    </template>

    <div class="px-8 pb-2">...</div> <!-- Continue rest -->

<script lang='ts'>
// Import statements remain unchanged

const currentStepValue = ref<number>(0);
const permissionTypes = [
  PermissionType.Public,
  PermissionType.Protected,
  PermissionType.Private,
] as number[] | string[];

function onChange(current_step_index_num) {
  currentStepValue.value = parseInt(String(current_step_index_num), 10);
}

function onRefresh(stepIndexNum?: number): void {
  refreshInitFieldList();

  if (stepIndexNum > currentIndex.value) return;

  currentIndex.value = stepIndexNum;
}
//
```

These changes make the code cleaner and more maintainable while maintaining its functionality.
created_at: 2025-03-17T06:04:31Z
author_association: CONTRIBUTOR
diff_hunk: @@ -433,14 +434,13 @@ function copyFunctionLib(row: any) {
 }
 
 function exportFunctionLib(row: any) {
-  functionLibApi.exportFunctionLib(row.id, row.name, loading)
-    .catch((e: any) => {
-      if (e.response.status !== 403) {
-        e.response.data.text().then((res: string) => {
-          MsgError(`${t('views.application.tip.ExportError')}:${JSON.parse(res).message}`)
-        })
-      }
-    })
+  functionLibApi.exportFunctionLib(row.id, row.name, loading).catch((e: any) => {
+    if (e.response.status !== 403) {
+      e.response.data.text().then((res: string) => {
+        MsgError(`${t('views.application.tip.ExportError')}:${JSON.parse(res).message}`)
+      })
+    }
+  })
 }
 
 function configPermission(item: any) {
path: ui/src/views/function-lib/index.vue
user: login: shaohuzhang1
body: The provided code is mostly clean and well-structured, but there are a few changes recommended to improve readability and maintainability:

1. **Remove Unused Variables**: The `internalDescRef` variable seems unused at this point. You can delete it from the script section.

2. **Simplify Function Calls**: Remove unnecessary parentheses in calls like `(item.permission_type === 'PUBLIC' && !canEdit(item))`.

3. **Consistent Indentation**: Ensure consistent indentation throughout the file to improve legibility. This might involve fixing inconsistencies between tab spaces and regular spaces.

### Revised JavaScript Code

```javascript
<template>
  <div class="function-lib-list-container p-24" style="padding-top: 16px">
    <el-tabs v-model="functionType">
      <el-tab-pane :label="$t('views.functionLib.title')" name="PUBLIC"></el-tab-pane>
      <el-tab-pane :label="$t('views.functionLib.internalTitle')" name="INTERNAL"></el-tab-pane>
    </el-tabs>

    <!-- ... rest of the template remains unchanged ... -->
  </div>
</template>

<script lang='ts'>
import { defineComponent } from 'vue';
// Import other necessary components and modules here ...

const Component = defineComponent({
  setup(props, context) {
    // Your existing setup logic here ...
    
    return {
      // Existing data, methods, etc. remain unchanged
      functionType: ref('PUBLIC'),
      loading: ref(false),
      canEdit,
      changeState,
      copyFunctionLib,
      exportFunctionLib,
      configPermission,
      searchHandle,
      openCreateDialog,
      getImageUrl,
      openDescDrawer,
    };
  },
});
```

In case you have further questions or need additional help with optimization, feel free to ask!
created_at: 2025-03-17T06:04:38Z
author_association: CONTRIBUTOR
diff_hunk: @@ -131,32 +131,29 @@
                   v-model="form.dataset_setting.no_references_setting.status"
                   class="radio-block"
                 >
-                  <div>
-                    <el-radio value="ai_questioning">
-                      <p>
-                        {{ $t('views.application.applicationForm.dialog.continueQuestioning') }}
-                      </p>
-                    </el-radio>
-                  </div>
-                  <div>
-                    <el-radio value="designated_answer">
-                      <p>{{ $t('views.application.applicationForm.dialog.provideAnswer') }}</p>
-                      <el-form-item
-                        v-if="
-                          form.dataset_setting.no_references_setting.status === 'designated_answer'
-                        "
-                        prop="designated_answer"
-                      >
-                        <el-input
-                          v-model="noReferencesform.designated_answer"
-                          :rows="2"
-                          type="textarea"
-                          maxlength="2048"
-                          :placeholder="defaultValue['designated_answer']"
-                        />
-                      </el-form-item>
-                    </el-radio>
-                  </div>
+                  <el-radio value="ai_questioning">
+                    <p>
+                      {{ $t('views.application.applicationForm.dialog.continueQuestioning') }}
+                    </p>
+                  </el-radio>
+
+                  <el-radio value="designated_answer">
+                    <p>{{ $t('views.application.applicationForm.dialog.provideAnswer') }}</p>
+                    <el-form-item
+                      v-if="
+                        form.dataset_setting.no_references_setting.status === 'designated_answer'
+                      "
+                      prop="designated_answer"
+                    >
+                      <el-input
+                        v-model="noReferencesform.designated_answer"
+                        :rows="2"
+                        type="textarea"
+                        maxlength="2048"
+                        :placeholder="defaultValue['designated_answer']"
+                      />
+                    </el-form-item>
+                  </el-radio>
                 </el-radio-group>
               </el-form>
             </el-form-item>
path: ui/src/views/application/component/ParamSettingDialog.vue
user: login: shaohuzhang1
body: No significant issues were found in the provided CSS code snippet. It appears to be properly formatted and contains no syntax errors or missing components. The structure of the `el-radio-group` with nested radio buttons is correct, ensuring that users can choose between "continueQuestioning" or "provideAnswer". There are also two instances where duplicate content has been removed for consistency.

This CSS should work as intended without further modifications. If you need to implement any specific changes based on additional context, I'd be happy to help suggest those!
created_at: 2025-03-17T06:04:41Z
author_association: CONTRIBUTOR

PR comments:
user: login: f2c-ci-robot[bot]
created_at: 2025-03-17T06:04:15Z
body: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our [release note process](https://git.k8s.io/community/contributors/guide/release-notes.md) to remove it.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
</details>
author_association: NONE
user: login: f2c-ci-robot[bot]
created_at: 2025-03-17T06:04:17Z
body: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by:


The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=1Panel-dev%2FMaxKB).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/1Panel-dev/MaxKB/blob/main/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
author_association: NONE