voice-page-agent 2.7.3 → 2.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -41,6 +41,8 @@ Use this shape:
41
41
  model: "qwen3.5-plus",
42
42
  apiKey: "NA",
43
43
  language: "zh-CN",
44
+ enablePanel: true, // keep page-agent panel visible
45
+ enableMask: false, // recommended for broader browser/GPU compatibility
44
46
  // ...any other page-agent options
45
47
  },
46
48
  wakeWord: "布丁布丁", // string or string[]
@@ -51,7 +53,18 @@ Use this shape:
51
53
  commandMaxWindowMs: 22000, // max command listening window
52
54
  recognitionLang: "zh-CN", // SpeechRecognition language
53
55
  showAgentWhenWake: true, // auto-open panel when wake hit
54
- autoStart: false // start wake on init
56
+ autoStart: false, // start wake on init
57
+ buttonText: {
58
+ startText: "开始唤醒",
59
+ wakeOnText: "语音唤醒中",
60
+ openText: "打开助手",
61
+ },
62
+ buttonStyle: {
63
+ wakeButtonBackground: "linear-gradient(135deg, #22c1ff, #3366ff)",
64
+ wakeButtonTextColor: "#ffffff",
65
+ openButtonBackground: "linear-gradient(135deg, #ffa84a, #ff5f6d)",
66
+ openButtonTextColor: "#ffffff",
67
+ }
55
68
  }
56
69
  ```
57
70
 
@@ -72,6 +85,15 @@ app.use(VoicePageAgentPlugin, {
72
85
  },
73
86
  wakeWord: "布丁布丁",
74
87
  enableHomophoneMatch: true,
88
+ buttonText: {
89
+ startText: "开始语音",
90
+ wakeOnText: "语音进行中",
91
+ openText: "网页助手",
92
+ },
93
+ buttonStyle: {
94
+ wakeButtonBackground: "linear-gradient(135deg, #38bdf8, #2563eb)",
95
+ openButtonBackground: "linear-gradient(135deg, #f59e0b, #ef4444)",
96
+ },
75
97
  });
76
98
  app.mount("#app");
77
99
  ```
@@ -101,6 +123,15 @@ Vue.use(VoicePageAgentPlugin, {
101
123
  language: "zh-CN",
102
124
  },
103
125
  wakeWord: "布丁布丁",
126
+ buttonText: {
127
+ startText: "开始语音",
128
+ wakeOnText: "语音进行中",
129
+ openText: "网页助手",
130
+ },
131
+ buttonStyle: {
132
+ wakeButtonBackground: "linear-gradient(135deg, #38bdf8, #2563eb)",
133
+ openButtonBackground: "linear-gradient(135deg, #f59e0b, #ef4444)",
134
+ },
104
135
  });
105
136
  ```
106
137
 
@@ -120,6 +151,15 @@ Vue.use(VoicePageAgentPlugin, {
120
151
  language: "zh-CN",
121
152
  },
122
153
  wakeWord: "布丁布丁",
154
+ buttonText: {
155
+ startText: "开始语音",
156
+ wakeOnText: "语音进行中",
157
+ openText: "网页助手",
158
+ },
159
+ buttonStyle: {
160
+ wakeButtonBackground: "linear-gradient(135deg, #38bdf8, #2563eb)",
161
+ openButtonBackground: "linear-gradient(135deg, #f59e0b, #ef4444)",
162
+ },
123
163
  });
124
164
  ```
125
165
 
@@ -137,7 +177,19 @@ You can use `VoicePageAgentButton` globally after plugin install:
137
177
  <VoicePageAgentButton />
138
178
  ```
139
179
 
140
- The component injects default styles automatically. You can override these classes in your app:
180
+ The component injects a built-in gradient style (same visual direction across Vue2 / Vue2.7 / Vue3).
181
+
182
+ You can override by props:
183
+
184
+ - `startText`
185
+ - `wakeOnText`
186
+ - `openText`
187
+ - `wakeButtonBackground`
188
+ - `wakeButtonTextColor`
189
+ - `openButtonBackground`
190
+ - `openButtonTextColor`
191
+
192
+ You can also override these classes in your app:
141
193
 
142
194
  - `.voice-page-agent-root`
143
195
  - `.voice-page-agent-actions`