PluginProbe
Extendify / 3.2.1
Extendify v3.2.1
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
← All changes | src/Agent/state/chat.js +2 -22 3.2.03.2.1 View file →
@@ -1,35 +1,15 @@
1 1 import { buildToolMessages } from '@agent/lib/tool-messages';
2 -import { isChangeSiteDesignWorkflowAvailable, makeId } from '@agent/lib/util';
2 +import { makeId } from '@agent/lib/util';
3 3 import { useStatusStore } from '@agent/state/status';
4 4 import apiFetch from '@wordpress/api-fetch';
5 -import { __ } from '@wordpress/i18n';
6 5 import { create } from 'zustand';
7 6 import { createJSONStorage, devtools, persist } from 'zustand/middleware';
8 7
9 8 const { chatHistory } = window.extAgentData;
10 9
11 -const welcomeMessage = [
12 - {
13 - id: 1,
14 - type: 'message',
15 - details: {
16 - role: 'assistant',
17 - // translators: this is the initial message in the agent chat, welcoming the user. Keep it short and friendly and follow the same markdown format and emoji.
18 - content: isChangeSiteDesignWorkflowAvailable()
19 - ? __(
20 - '#### Your site is ready 🎉\nWant to explore other website designs?',
21 - 'extendify-local',
22 - )
23 - : __(
24 - '#### Your site is ready 🎉\nWant to explore other site colors?',
25 - 'extendify-local',
26 - ),
27 - },
28 - },
29 -];
30 10 const state = (set, get) => ({
31 - messages: chatHistory?.length ? chatHistory.toReversed() : welcomeMessage,
11 + messages: chatHistory?.length ? chatHistory.toReversed() : [],
32 12 // API messages, back to the last finished workflow.
33 13 getCurrentMessages: ({ includeTools = true } = {}) => {
34 14 const messages = [];
35 15 let foundUserMessage = false;