|
86 | 86 | <template #icon> |
87 | 87 | <AssistantIcon /> |
88 | 88 | </template> |
89 | | - <template #default> |
90 | | - <NcButton @click="chatContent = 'What\'s the weather in berlin, right now?'" :aria-label="t('assisant', 'Ask assistant, what\'s the weather in berlin right now')" variant="secondary"> |
91 | | - {{ t('assistant', 'What\'s the weather in berlin, right now?') }} |
92 | | - </NcButton> |
93 | | - <NcButton @click="chatContent = 'Can you show me a map of Berlin?'" :aria-label="t('assisant', 'Ask assistant, to show you a map of Berlin')" variant="secondary"> |
94 | | - {{ t('assistant', 'Can you show me a map of Berlin?') }} |
95 | | - </NcButton> |
96 | | - </template> |
| 89 | + <template #action> |
| 90 | + <div v-if="agencyAvailable" class="session-area__agency-suggestions"> |
| 91 | + <NcButton v-for="suggestion in agencySuggestions" |
| 92 | + :key="suggestion.message" |
| 93 | + class="session-area__agency-suggestion" |
| 94 | + :aria-label="suggestion.aria" |
| 95 | + variant="secondary" |
| 96 | + @click="chatContent = suggestion.message"> |
| 97 | + {{ t('assistant', suggestion.message) }} |
| 98 | + </NcButton> |
| 99 | + </div> |
| 100 | + </template> |
97 | 101 | </NoSession> |
98 | 102 | <div v-else |
99 | 103 | class="session-area__chat-area__active-session" |
@@ -240,6 +244,7 @@ export default { |
240 | 244 | }, |
241 | 245 |
|
242 | 246 | data: () => { |
| 247 | + const agencyAvailable = loadState('assistant', 'agency_available', false) |
243 | 248 | return { |
244 | 249 | // { id: number, title: string, user_id: string, timestamp: number } |
245 | 250 | active: null, |
@@ -269,6 +274,21 @@ export default { |
269 | 274 | pollTitleGenerationTimerId: null, |
270 | 275 | autoplayAudioChat: loadState('assistant', 'autoplay_audio_chat', true), |
271 | 276 | slowPickup: false, |
| 277 | + agencyAvailable, |
| 278 | + agencySuggestions: [ |
| 279 | + { |
| 280 | + aria: t('assisant', 'Ask assistant, what\'s the weather in Berlin right now'), |
| 281 | + message: t('assisant', 'What\'s the weather in Berlin right now?'), |
| 282 | + }, |
| 283 | + { |
| 284 | + aria: t('assisant', 'Ask assistant, to create a share link for a file'), |
| 285 | + message: t('assisant', 'Can you create a share link for the following file in my documents? welcome.txt'), |
| 286 | + }, |
| 287 | + { |
| 288 | + aria: t('assisant', 'Ask assistant, which actions it can do for you'), |
| 289 | + message: t('assisant', 'Which actions can you do for me?'), |
| 290 | + }, |
| 291 | + ], |
272 | 292 | } |
273 | 293 | }, |
274 | 294 |
|
@@ -1031,6 +1051,13 @@ export default { |
1031 | 1051 | position: sticky; |
1032 | 1052 | bottom: 0; |
1033 | 1053 | } |
| 1054 | +
|
| 1055 | + &__agency-suggestions { |
| 1056 | + display: flex; |
| 1057 | + flex-direction: column; |
| 1058 | + align-items: center; |
| 1059 | + gap: 10px; |
| 1060 | + } |
1034 | 1061 | } |
1035 | 1062 | } |
1036 | 1063 | </style> |
0 commit comments