mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-30 21:16:51 +00:00
@@ -290,6 +290,18 @@ const onToggleShowMore = () => {
|
||||
isExpandedPredefiendBasePromts.value = !isExpandedPredefiendBasePromts.value
|
||||
}
|
||||
|
||||
const handleMouseOverTag = (description: string) => {
|
||||
if (!aiIntegrationAvailable.value || (aiLoading.value && callFunction.value === 'onPredictSchema')) return
|
||||
|
||||
aiFormState.value.onHoverTagPrompt = description
|
||||
}
|
||||
|
||||
const handleMouseLeaveTag = () => {
|
||||
if (!aiIntegrationAvailable.value || (aiLoading.value && callFunction.value === 'onPredictSchema')) return
|
||||
|
||||
aiFormState.value.onHoverTagPrompt = ''
|
||||
}
|
||||
|
||||
const resetToDefault = () => {
|
||||
aiMode.value = null
|
||||
aiStep.value = AI_STEP.PROMPT
|
||||
@@ -348,7 +360,7 @@ onMounted(() => {
|
||||
<!-- create base config panel -->
|
||||
<div class="flex-1 p-6 flex flex-col gap-6">
|
||||
<div class="text-sm font-bold text-nc-content-purple-dark">Tell us more about your usecase</div>
|
||||
<div class="flex flex-wrap gap-3 max-h-[188px] nc-scrollbar-thin overflow-visible">
|
||||
<div class="flex flex-wrap gap-3 max-h-[188px] nc-scrollbar-thin">
|
||||
<!-- Predefined tags -->
|
||||
|
||||
<template v-for="prompt of predefinedBasePrompts" :key="prompt.tag">
|
||||
@@ -359,8 +371,8 @@ onMounted(() => {
|
||||
'nc-disabled': !aiIntegrationAvailable || (aiLoading && callFunction === 'onPredictSchema'),
|
||||
}"
|
||||
:disabled="!aiIntegrationAvailable || (aiLoading && callFunction === 'onPredictSchema')"
|
||||
@mouseover="aiFormState.onHoverTagPrompt = aiIntegrationAvailable ? prompt.description : ''"
|
||||
@mouseleave="aiFormState.onHoverTagPrompt = ''"
|
||||
@mouseover="handleMouseOverTag(prompt.description)"
|
||||
@mouseleave="handleMouseLeaveTag"
|
||||
@click="handleUpdatePrompt(prompt.description)"
|
||||
>
|
||||
<div class="flex flex-row items-center gap-1 py-1 text-sm">
|
||||
@@ -399,6 +411,7 @@ onMounted(() => {
|
||||
class="!w-full !min-h-[120px] !rounded-lg mt-2 overflow-y-auto nc-scrollbar-thin nc-input-shadow nc-ai-input"
|
||||
size="middle"
|
||||
:disabled="!aiIntegrationAvailable || (aiLoading && callFunction === 'onPredictSchema')"
|
||||
:maxlength="8192"
|
||||
@update:value="aiFormState.prompt = $event"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user