Skip to content

Commit 5f21e2d

Browse files
authored
AI-assistant UX improvements (baserow#4123)
1 parent 665caec commit 5f21e2d

File tree

13 files changed

+140
-23
lines changed

13 files changed

+140
-23
lines changed

enterprise/backend/src/baserow_enterprise/assistant/prompts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
ASSISTANT_SYSTEM_PROMPT = (
5353
"""
54-
You are Baserow Assistant, an AI expert for Baserow (open-source no-code platform).
54+
You are Kuma, an AI expert for Baserow (open-source no-code platform).
5555
5656
## YOUR KNOWLEDGE
5757
1. **Core concepts** (below)

enterprise/web-frontend/modules/baserow_enterprise/assets/images/kuma.svg

Lines changed: 29 additions & 0 deletions
Loading

enterprise/web-frontend/modules/baserow_enterprise/assets/scss/components/assistant.scss

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,25 +91,36 @@
9191
max-width: 680px;
9292
margin: 0 auto;
9393
width: 100%;
94+
padding: 0 20px;
9495
}
9596

96-
.assistant__welcome-icon {
97+
.assistant__welcome-kuma {
98+
position: relative;
99+
display: block;
97100
width: 80px;
98-
height: 80px;
99-
background: linear-gradient(135deg, $palette-blue-500 0%, lighten($palette-blue-500, 10%) 100%);
100-
border-radius: 50%;
101-
display: flex;
102-
align-items: center;
103-
justify-content: center;
104-
margin-bottom: 24px;
105-
box-shadow: 0 4px 12px rgba($palette-blue-500, 0.2);
101+
height: 94px;
102+
margin: 0 auto 18px;
106103

107-
i {
108-
font-size: 36px;
109-
color: $white;
104+
&::after {
105+
content: '';
106+
width: 24px;
107+
height: 6px;
108+
background-color: $palette-neutral-100;
109+
border-radius: 100%;
110+
transform: translateX(-50%);
111+
112+
@include absolute(auto, auto, 0, 50%);
110113
}
111114
}
112115

116+
.assistant__welcome-video {
117+
display: block;
118+
width: 80px;
119+
height: 80px;
120+
outline: 0;
121+
margin: 0 auto;
122+
}
123+
113124
.assistant__welcome-title {
114125
font-size: 20px;
115126
font-weight: 600;
@@ -119,7 +130,7 @@
119130

120131
.assistant__welcome-subtitle {
121132
font-size: 13px;
122-
color: $palette-neutral-1200;
133+
color: $palette-neutral-900;
123134
line-height: 1.5;
124135
margin: 0 0 32px;
125136
}
Binary file not shown.

enterprise/web-frontend/modules/baserow_enterprise/components/assistant/AssistantSidebarItem.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
<span class="tree__link-text">{{
2727
$t('assistantSidebarItem.title')
2828
}}</span>
29+
<i
30+
v-show="rightSidebarOpen"
31+
class="tree__icon-right iconoir-view-columns-3"
32+
></i>
2933
</a>
3034
</div>
3135
<PaidFeaturesModal
@@ -49,6 +53,11 @@ export default {
4953
type: Object,
5054
required: true,
5155
},
56+
rightSidebarOpen: {
57+
type: Boolean,
58+
required: false,
59+
default: false,
60+
},
5261
},
5362
computed: {
5463
deactivated() {

enterprise/web-frontend/modules/baserow_enterprise/components/assistant/AssistantWelcomeMessage.vue

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
<template>
22
<div class="assistant__welcome">
3-
<div class="assistant__welcome-icon">
4-
<i class="iconoir-message-text"></i>
3+
<div class="assistant__welcome-kuma">
4+
<video
5+
:src="video"
6+
autoplay
7+
loop
8+
muted
9+
playsinline
10+
preload="auto"
11+
:poster="image"
12+
controlslist="nodownload nofullscreen noplaybackrate noremoteplayback"
13+
disablepictureinpicture
14+
oncontextmenu="return false;"
15+
aria-hidden="true"
16+
role="presentation"
17+
class="assistant__welcome-video"
18+
>
19+
<img :src="image" />
20+
</video>
521
</div>
622
<h2 class="assistant__welcome-title">
723
<span class="assistant__welcome-title-greeting">
@@ -16,6 +32,9 @@
1632
</template>
1733

1834
<script>
35+
import video from '@baserow_enterprise/assets/videos/kuma.mp4'
36+
import image from '@baserow_enterprise/assets/images/kuma.svg'
37+
1938
export default {
2039
name: 'AssistantWelcomeMessage',
2140
props: {
@@ -24,5 +43,13 @@ export default {
2443
default: 'there',
2544
},
2645
},
46+
computed: {
47+
video() {
48+
return video
49+
},
50+
image() {
51+
return image
52+
},
53+
},
2754
}
2855
</script>

enterprise/web-frontend/modules/baserow_enterprise/locales/en.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@
322322
"dateDependencyContent": "You can define a dependency between two dates and a duration as start/end date and duration. With date dependency, if one value change, other values will be adjusted accordingly."
323323
},
324324
"assistantSidebarItem": {
325-
"title": "AI assistant"
325+
"title": "Kuma AI"
326326
},
327327
"assistantPanel": {
328328
"title": "AI Assistant",
@@ -332,8 +332,8 @@
332332
},
333333
"assistantWelcomeMessage": {
334334
"greet": "Hey {name}",
335-
"question": "how can I help?",
336-
"subtitle": "I'm here to support you in handling your data."
335+
"question": "my name is Kuma!",
336+
"subtitle": "I’ll help you bear the load so it never feels heavy. Choose from the prompts below or just tell me what you need!"
337337
},
338338
"assistantInputMessage": {
339339
"statusWaiting": "Assistant is ready to help",

web-frontend/modules/core/assets/scss/components/tree.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@
139139
}
140140
}
141141

142+
.tree__icon-right {
143+
margin-left: auto;
144+
font-size: 14px;
145+
}
146+
142147
%tree-sub-size {
143148
line-height: 32px;
144149
height: 32px;

web-frontend/modules/core/assets/scss/variables.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ $grid-width: 20px;
99
$z-index-layout-col-1: 3 !default;
1010
$z-index-layout-col-2: 2 !default;
1111
$z-index-layout-col-3: 1 !default;
12-
$z-index-layout-resize: 4 !default;
13-
$z-index-layout-col-3-1: 6 !default;
14-
$z-index-layout-col-3-2: 5 !default;
12+
$z-index-layout-col-3-1: 5 !default;
13+
$z-index-layout-col-3-2: 4 !default;
14+
$z-index-layout-resize: 6 !default;
1515

1616
// The z-index of modal and context must always be the same because they can be nested
1717
// inside each other. The order in html decided which must be shown over the other.

web-frontend/modules/core/components/HorizontalResize.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ export default {
2525
required: false,
2626
default: false,
2727
},
28+
right: {
29+
type: Boolean,
30+
required: false,
31+
default: false,
32+
},
2833
},
2934
data() {
3035
return {
@@ -53,7 +58,12 @@ export default {
5358
move(event) {
5459
event.preventDefault()
5560
const difference = event.clientX - this.mouseStart
56-
let newWidth = Math.max(this.startWidth + difference, this.min)
61+
let newWidth = 0
62+
if (this.right) {
63+
newWidth = Math.max(this.startWidth - difference, this.min)
64+
} else {
65+
newWidth = Math.max(this.startWidth + difference, this.min)
66+
}
5767
if (this.max) {
5868
newWidth = Math.min(newWidth, this.max)
5969
}

0 commit comments

Comments
 (0)