foliko 1.0.85 → 1.0.87
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/.agent/agents/code-assistant.json +14 -0
- package/.agent/agents/email-assistant.json +14 -0
- package/.agent/agents/file-assistant.json +15 -0
- package/.agent/agents/system-assistant.json +15 -0
- package/.agent/agents/web-assistant.json +12 -0
- package/.agent/data/ambient/goals.json +50 -0
- package/.agent/data/ambient/memories.json +7 -0
- package/.agent/data/default.json +21 -311
- package/.agent/data/plugins-state.json +162 -174
- package/.agent/data/scheduler/tasks.json +1 -0
- package/.agent/data/weixin.json +6 -0
- package/.agent/mcp_config.json +1 -0
- package/.agent/package.json +8 -0
- package/.agent/plugins/__pycache__/test_plugin.cpython-312.pyc +0 -0
- package/.agent/plugins/daytona/README.md +89 -0
- package/.agent/plugins/daytona/index.js +377 -0
- package/.agent/plugins/daytona/package.json +12 -0
- package/.agent/plugins/marknative/README.md +134 -0
- package/.agent/plugins/marknative/index.js +228 -0
- package/.agent/plugins/marknative/package.json +12 -0
- package/.agent/plugins/marknative/update-readme.js +134 -0
- package/.agent/plugins/system-info/index.js +387 -0
- package/.agent/plugins/system-info/package.json +4 -0
- package/.agent/plugins/system-info/test.js +40 -0
- package/.agent/plugins/temp-repo/LICENSE +201 -0
- package/.agent/plugins/test_plugin.py +304 -0
- package/.agent/plugins.json +14 -5
- package/.agent/python-scripts/test_sample.py +24 -0
- package/.agent/skills/agent-browser/SKILL.md +311 -0
- package/.agent/skills/agent-browser/TEST_PLAN.md +200 -0
- package/.agent/skills/sysinfo/SKILL.md +38 -0
- package/.agent/skills/sysinfo/system-info.sh +130 -0
- package/.agent/skills/workflow/SKILL.md +324 -0
- package/.agent/workflows/email-digest.json +50 -0
- package/.agent/workflows/file-backup.json +21 -0
- package/.agent/workflows/get-ip-notify.json +32 -0
- package/.agent/workflows/news-aggregator.json +93 -0
- package/.agent/workflows/news-dashboard-v2.json +94 -0
- package/.agent/workflows/notification-batch.json +32 -0
- package/.claude/settings.local.json +8 -7
- package/.env.example +56 -56
- package/README.md +441 -441
- package/examples/test-chat-debug.js +102 -0
- package/examples/test-chat-result.js +76 -0
- package/examples/test-chat-stream-diff.js +63 -0
- package/examples/test-concurrent-chat.js +60 -0
- package/examples/test-long-chat.js +77 -0
- package/examples/test-session-chat.js +93 -0
- package/package.json +2 -2
- package/plugins/ambient-agent/EventWatcher.js +4 -4
- package/plugins/extension-executor-plugin.js +44 -1
- package/plugins/file-system-plugin.js +44 -5
- package/plugins/session-plugin.js +21 -0
- package/plugins/weixin-plugin.js +278 -29
- package/skills/find-skills/AGENTS.md +162 -162
- package/skills/find-skills/SKILL.md +133 -133
- package/skills/foliko-dev/SKILL.md +67 -0
- package/skills/python-plugin-dev/SKILL.md +238 -238
- package/src/core/agent-chat.js +106 -58
- package/src/core/agent.js +3 -61
- package/src/utils/index.js +1 -1
- package/.agent/.shared/ui-ux-pro-max/data/charts.csv +0 -26
- package/.agent/.shared/ui-ux-pro-max/data/colors.csv +0 -97
- package/.agent/.shared/ui-ux-pro-max/data/icons.csv +0 -101
- package/.agent/.shared/ui-ux-pro-max/data/landing.csv +0 -31
- package/.agent/.shared/ui-ux-pro-max/data/products.csv +0 -97
- package/.agent/.shared/ui-ux-pro-max/data/prompts.csv +0 -24
- package/.agent/.shared/ui-ux-pro-max/data/react-performance.csv +0 -45
- package/.agent/.shared/ui-ux-pro-max/data/stacks/flutter.csv +0 -53
- package/.agent/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +0 -56
- package/.agent/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +0 -53
- package/.agent/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +0 -53
- package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +0 -51
- package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +0 -59
- package/.agent/.shared/ui-ux-pro-max/data/stacks/react-native.csv +0 -52
- package/.agent/.shared/ui-ux-pro-max/data/stacks/react.csv +0 -54
- package/.agent/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +0 -61
- package/.agent/.shared/ui-ux-pro-max/data/stacks/svelte.csv +0 -54
- package/.agent/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +0 -51
- package/.agent/.shared/ui-ux-pro-max/data/stacks/vue.csv +0 -50
- package/.agent/.shared/ui-ux-pro-max/data/styles.csv +0 -59
- package/.agent/.shared/ui-ux-pro-max/data/typography.csv +0 -58
- package/.agent/.shared/ui-ux-pro-max/data/ui-reasoning.csv +0 -101
- package/.agent/.shared/ui-ux-pro-max/data/ux-guidelines.csv +0 -100
- package/.agent/.shared/ui-ux-pro-max/data/web-interface.csv +0 -31
- package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/core.cpython-313.pyc +0 -0
- package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
- package/.agent/.shared/ui-ux-pro-max/scripts/core.py +0 -258
- package/.agent/.shared/ui-ux-pro-max/scripts/design_system.py +0 -1067
- package/.agent/.shared/ui-ux-pro-max/scripts/search.py +0 -106
- package/.agent/ARCHITECTURE.md +0 -288
- package/.agent/agents/ambient-agent.md +0 -57
- package/.agent/agents/debugger.md +0 -55
- package/.agent/agents/email-assistant.md +0 -49
- package/.agent/agents/file-manager.md +0 -42
- package/.agent/agents/python-developer.md +0 -60
- package/.agent/agents/scheduler.md +0 -59
- package/.agent/agents/web-developer.md +0 -45
- package/.agent/data/puppeteer-sessions/undefined.json +0 -6
- package/.agent/mcp_config_updated.json +0 -12
- package/.agent/rules/GEMINI.md +0 -273
- package/.agent/rules/allow-rule.md +0 -77
- package/.agent/rules/log-rule.md +0 -83
- package/.agent/rules/security-rule.md +0 -93
- package/.agent/scripts/auto_preview.py +0 -148
- package/.agent/scripts/checklist.py +0 -217
- package/.agent/scripts/session_manager.py +0 -120
- package/.agent/scripts/verify_all.py +0 -327
- package/.agent/skills/api-patterns/SKILL.md +0 -81
- package/.agent/skills/api-patterns/api-style.md +0 -42
- package/.agent/skills/api-patterns/auth.md +0 -24
- package/.agent/skills/api-patterns/documentation.md +0 -26
- package/.agent/skills/api-patterns/graphql.md +0 -41
- package/.agent/skills/api-patterns/rate-limiting.md +0 -31
- package/.agent/skills/api-patterns/response.md +0 -37
- package/.agent/skills/api-patterns/rest.md +0 -40
- package/.agent/skills/api-patterns/scripts/api_validator.py +0 -211
- package/.agent/skills/api-patterns/security-testing.md +0 -122
- package/.agent/skills/api-patterns/trpc.md +0 -41
- package/.agent/skills/api-patterns/versioning.md +0 -22
- package/.agent/skills/app-builder/SKILL.md +0 -75
- package/.agent/skills/app-builder/agent-coordination.md +0 -71
- package/.agent/skills/app-builder/feature-building.md +0 -53
- package/.agent/skills/app-builder/project-detection.md +0 -34
- package/.agent/skills/app-builder/scaffolding.md +0 -118
- package/.agent/skills/app-builder/tech-stack.md +0 -40
- package/.agent/skills/app-builder/templates/SKILL.md +0 -39
- package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
- package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
- package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
- package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
- package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
- package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -122
- package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -122
- package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -169
- package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -134
- package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
- package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -119
- package/.agent/skills/architecture/SKILL.md +0 -55
- package/.agent/skills/architecture/context-discovery.md +0 -43
- package/.agent/skills/architecture/examples.md +0 -94
- package/.agent/skills/architecture/pattern-selection.md +0 -68
- package/.agent/skills/architecture/patterns-reference.md +0 -50
- package/.agent/skills/architecture/trade-off-analysis.md +0 -77
- package/.agent/skills/clean-code/SKILL.md +0 -201
- package/.agent/skills/doc.md +0 -177
- package/.agent/skills/frontend-design/SKILL.md +0 -418
- package/.agent/skills/frontend-design/animation-guide.md +0 -331
- package/.agent/skills/frontend-design/color-system.md +0 -311
- package/.agent/skills/frontend-design/decision-trees.md +0 -418
- package/.agent/skills/frontend-design/motion-graphics.md +0 -306
- package/.agent/skills/frontend-design/scripts/accessibility_checker.py +0 -183
- package/.agent/skills/frontend-design/scripts/ux_audit.py +0 -722
- package/.agent/skills/frontend-design/typography-system.md +0 -345
- package/.agent/skills/frontend-design/ux-psychology.md +0 -1116
- package/.agent/skills/frontend-design/visual-effects.md +0 -383
- package/.agent/skills/i18n-localization/SKILL.md +0 -154
- package/.agent/skills/i18n-localization/scripts/i18n_checker.py +0 -241
- package/.agent/skills/mcp-builder/SKILL.md +0 -176
- package/.agent/skills/web-design-guidelines/SKILL.md +0 -57
- package/.agent/workflows/brainstorm.md +0 -113
- package/.agent/workflows/create.md +0 -59
- package/.agent/workflows/debug.md +0 -103
- package/.agent/workflows/deploy.md +0 -176
- package/.agent/workflows/enhance.md +0 -63
- package/.agent/workflows/orchestrate.md +0 -237
- package/.agent/workflows/plan.md +0 -89
- package/.agent/workflows/preview.md +0 -81
- package/.agent/workflows/simple-test.md +0 -42
- package/.agent/workflows/status.md +0 -86
- package/.agent/workflows/structured-orchestrate.md +0 -180
- package/.agent/workflows/test.md +0 -144
- package/.agent/workflows/ui-ux-pro-max.md +0 -296
- /package/.agent/plugins/{puppeteer-plugin → temp-repo/puppeteer-plugin}/README.md +0 -0
- /package/.agent/plugins/{puppeteer-plugin → temp-repo/puppeteer-plugin}/index.js +0 -0
- /package/.agent/plugins/{puppeteer-plugin → temp-repo/puppeteer-plugin}/package.json +0 -0
package/src/core/agent-chat.js
CHANGED
|
@@ -123,6 +123,10 @@ class AgentChatHandler extends EventEmitter {
|
|
|
123
123
|
|
|
124
124
|
// Session 历史存储配置
|
|
125
125
|
this._sessionHistoryKey = config.sessionHistoryKey || 'chat_history';
|
|
126
|
+
|
|
127
|
+
// Per-Session 队列管理
|
|
128
|
+
this._sessionQueues = new Map(); // sessionId -> Queue of {message, options, resolve, reject}
|
|
129
|
+
this._processingSessions = new Set(); // sessionId -> processing flag
|
|
126
130
|
}
|
|
127
131
|
|
|
128
132
|
/**
|
|
@@ -139,6 +143,7 @@ class AgentChatHandler extends EventEmitter {
|
|
|
139
143
|
if (!sessionPlugin) return [];
|
|
140
144
|
|
|
141
145
|
const messages = sessionPlugin.getHistory(sessionId);
|
|
146
|
+
// 直接返回,保存时已清理,数据应该是干净的
|
|
142
147
|
return messages || [];
|
|
143
148
|
} catch (err) {
|
|
144
149
|
// 忽略加载错误
|
|
@@ -153,28 +158,78 @@ class AgentChatHandler extends EventEmitter {
|
|
|
153
158
|
* @private
|
|
154
159
|
*/
|
|
155
160
|
_saveHistoryToSession(sessionId, messages) {
|
|
156
|
-
if (!sessionId || !this.agent?.framework || !messages
|
|
161
|
+
if (!sessionId || !this.agent?.framework || !messages) return;
|
|
157
162
|
|
|
158
163
|
try {
|
|
159
164
|
const sessionPlugin = this.agent.framework.pluginManager.get('session');
|
|
160
165
|
if (!sessionPlugin) return;
|
|
161
166
|
|
|
162
|
-
//
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
// 只添加新消息(避免重复添加已加载的历史)
|
|
167
|
-
const simpleMessages = messages;
|
|
168
|
-
|
|
169
|
-
const newMessages = simpleMessages.slice(existingCount);
|
|
170
|
-
for (const msg of newMessages) {
|
|
171
|
-
sessionPlugin.addMessage(sessionId, msg);
|
|
172
|
-
}
|
|
167
|
+
// 清理消息格式后整体替换
|
|
168
|
+
const cleanedMessages = prepareMessagesForAPI(messages);
|
|
169
|
+
sessionPlugin.replaceMessages(sessionId, cleanedMessages);
|
|
173
170
|
} catch (err) {
|
|
174
171
|
// 忽略保存错误
|
|
175
172
|
}
|
|
176
173
|
}
|
|
177
174
|
|
|
175
|
+
/**
|
|
176
|
+
* 将消息加入队列(Per-Session)
|
|
177
|
+
* @param {string} sessionId - 会话 ID
|
|
178
|
+
* @param {string|Object} message - 消息
|
|
179
|
+
* @param {Object} options - 选项
|
|
180
|
+
* @returns {Promise}
|
|
181
|
+
*/
|
|
182
|
+
enqueue(sessionId, message, options = {}) {
|
|
183
|
+
if (!this._sessionQueues.has(sessionId)) {
|
|
184
|
+
this._sessionQueues.set(sessionId, []);
|
|
185
|
+
}
|
|
186
|
+
const queue = this._sessionQueues.get(sessionId);
|
|
187
|
+
|
|
188
|
+
if (this._processingSessions.has(sessionId)) {
|
|
189
|
+
// 已在处理中,加入队列
|
|
190
|
+
return new Promise((resolve, reject) => {
|
|
191
|
+
queue.push({ message, options, resolve, reject });
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// 直接处理
|
|
196
|
+
return this._processWithSession(sessionId, message, options);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* 处理单个 session 的消息
|
|
201
|
+
* @param {string} sessionId - 会话 ID
|
|
202
|
+
* @param {string|Object} message - 消息
|
|
203
|
+
* @param {Object} options - 选项
|
|
204
|
+
* @returns {Promise}
|
|
205
|
+
* @private
|
|
206
|
+
*/
|
|
207
|
+
async _processWithSession(sessionId, message, options) {
|
|
208
|
+
this._processingSessions.add(sessionId);
|
|
209
|
+
try {
|
|
210
|
+
return await this._doChat(message, options);
|
|
211
|
+
} finally {
|
|
212
|
+
this._processingSessions.delete(sessionId);
|
|
213
|
+
// 处理队列中的下一条
|
|
214
|
+
setImmediate(() => this._drainQueue(sessionId));
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* 消费队列中的下一条消息
|
|
220
|
+
* @param {string} sessionId - 会话 ID
|
|
221
|
+
* @private
|
|
222
|
+
*/
|
|
223
|
+
_drainQueue(sessionId) {
|
|
224
|
+
const queue = this._sessionQueues.get(sessionId);
|
|
225
|
+
if (!queue || queue.length === 0) return;
|
|
226
|
+
|
|
227
|
+
const item = queue.shift();
|
|
228
|
+
this._processWithSession(sessionId, item.message, item.options)
|
|
229
|
+
.then(item.resolve)
|
|
230
|
+
.catch(item.reject);
|
|
231
|
+
}
|
|
232
|
+
|
|
178
233
|
/**
|
|
179
234
|
* 静态方法:保留接口兼容性(无实际作用)
|
|
180
235
|
*/
|
|
@@ -287,9 +342,10 @@ class AgentChatHandler extends EventEmitter {
|
|
|
287
342
|
* 1. 如果启用了智能摘要且有 AI 客户端,对早期消息进行 AI 总结
|
|
288
343
|
* 2. 否则使用简单裁剪 + 标记
|
|
289
344
|
* 3. 支持超时控制,防止压缩阻塞太久
|
|
345
|
+
* @param {string} sessionId - 会话 ID(用于压缩后同步)
|
|
290
346
|
* @private
|
|
291
347
|
*/
|
|
292
|
-
async _compressContext() {
|
|
348
|
+
async _compressContext(sessionId) {
|
|
293
349
|
// 如果已经有压缩在进行,返回现有的 Promise
|
|
294
350
|
if (this._compressionInProgress && this._compressionPromise) {
|
|
295
351
|
logger.debug('Compression already in progress, waiting for it...');
|
|
@@ -303,7 +359,7 @@ class AgentChatHandler extends EventEmitter {
|
|
|
303
359
|
this._compressionInProgress = true;
|
|
304
360
|
|
|
305
361
|
// 创建压缩 Promise,带超时控制
|
|
306
|
-
this._compressionPromise = this._executeCompressionWithTimeout().finally(() => {
|
|
362
|
+
this._compressionPromise = this._executeCompressionWithTimeout(sessionId).finally(() => {
|
|
307
363
|
this._compressionInProgress = false;
|
|
308
364
|
this._compressionPromise = null;
|
|
309
365
|
});
|
|
@@ -313,15 +369,16 @@ class AgentChatHandler extends EventEmitter {
|
|
|
313
369
|
|
|
314
370
|
/**
|
|
315
371
|
* 执行压缩(带超时)
|
|
372
|
+
* @param {string} sessionId - 会话 ID
|
|
316
373
|
* @private
|
|
317
374
|
*/
|
|
318
|
-
async _executeCompressionWithTimeout() {
|
|
375
|
+
async _executeCompressionWithTimeout(sessionId) {
|
|
319
376
|
try {
|
|
320
|
-
return await Promise.race([this._doCompress(), this._createTimeoutPromise()]);
|
|
377
|
+
return await Promise.race([this._doCompress(sessionId), this._createTimeoutPromise()]);
|
|
321
378
|
} catch (err) {
|
|
322
379
|
logger.warn('Compression failed:', err.message);
|
|
323
380
|
// 压缩失败时使用简单的截断策略
|
|
324
|
-
this._simpleCompress();
|
|
381
|
+
this._simpleCompress(sessionId);
|
|
325
382
|
}
|
|
326
383
|
}
|
|
327
384
|
|
|
@@ -358,9 +415,10 @@ class AgentChatHandler extends EventEmitter {
|
|
|
358
415
|
|
|
359
416
|
/**
|
|
360
417
|
* 执行实际压缩逻辑
|
|
418
|
+
* @param {string} sessionId - 会话 ID
|
|
361
419
|
* @private
|
|
362
420
|
*/
|
|
363
|
-
async _doCompress() {
|
|
421
|
+
async _doCompress(sessionId) {
|
|
364
422
|
const systemMessages = this._messages.filter((m) => m.role === 'system');
|
|
365
423
|
const otherMessages = this._messages.filter((m) => m.role !== 'system');
|
|
366
424
|
|
|
@@ -398,13 +456,19 @@ class AgentChatHandler extends EventEmitter {
|
|
|
398
456
|
logger.info(
|
|
399
457
|
`Context compressed (${this._compressionCount} times). Messages: ${this._messages.length}, Est. tokens: ${totalTokens}`
|
|
400
458
|
);
|
|
459
|
+
|
|
460
|
+
// 压缩后立即同步到 session
|
|
461
|
+
if (sessionId) {
|
|
462
|
+
this._saveHistoryToSession(sessionId, this._messages);
|
|
463
|
+
}
|
|
401
464
|
}
|
|
402
465
|
|
|
403
466
|
/**
|
|
404
467
|
* 简单压缩(当 AI 压缩失败时使用)
|
|
468
|
+
* @param {string} sessionId - 会话 ID
|
|
405
469
|
* @private
|
|
406
470
|
*/
|
|
407
|
-
_simpleCompress() {
|
|
471
|
+
_simpleCompress(sessionId) {
|
|
408
472
|
const systemMessages = this._messages.filter((m) => m.role === 'system');
|
|
409
473
|
const otherMessages = this._messages.filter((m) => m.role !== 'system');
|
|
410
474
|
const recentMessages = otherMessages.slice(-this._keepRecentMessages);
|
|
@@ -425,6 +489,11 @@ class AgentChatHandler extends EventEmitter {
|
|
|
425
489
|
logger.info(
|
|
426
490
|
`Context simple compressed (${this._compressionCount} times). Messages: ${this._messages.length}`
|
|
427
491
|
);
|
|
492
|
+
|
|
493
|
+
// 压缩后立即同步到 session
|
|
494
|
+
if (sessionId) {
|
|
495
|
+
this._saveHistoryToSession(sessionId, this._messages);
|
|
496
|
+
}
|
|
428
497
|
}
|
|
429
498
|
|
|
430
499
|
/**
|
|
@@ -653,15 +722,25 @@ ${truncatedContent}${truncatedNote}
|
|
|
653
722
|
}
|
|
654
723
|
|
|
655
724
|
/**
|
|
656
|
-
*
|
|
725
|
+
* 发送消息(非流式)- 使用队列机制
|
|
657
726
|
* @param {string|Object} message - 消息
|
|
658
727
|
* @param {Object} options - 选项
|
|
659
728
|
*/
|
|
660
729
|
async chat(message, options = {}) {
|
|
730
|
+
const sessionId = options.sessionId || null;
|
|
731
|
+
return this.enqueue(sessionId, message, options);
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* 执行实际聊天逻辑
|
|
736
|
+
* @param {string|Object} message - 消息
|
|
737
|
+
* @param {Object} options - 选项
|
|
738
|
+
* @private
|
|
739
|
+
*/
|
|
740
|
+
async _doChat(message, options = {}) {
|
|
661
741
|
const sessionId = options.sessionId || null;
|
|
662
742
|
const context = { sessionId, isStream: false };
|
|
663
743
|
const framework = this.agent.framework;
|
|
664
|
-
const self = this; // 保存引用用于回调
|
|
665
744
|
|
|
666
745
|
try {
|
|
667
746
|
// 从 session 加载聊天历史
|
|
@@ -696,9 +775,7 @@ ${truncatedContent}${truncatedNote}
|
|
|
696
775
|
`Context large (${totalTokens}/${this._maxContextTokens} tokens = msgs:${messagesTokens} + tools:${toolsTokens} + sys:${systemPromptTokens}), compressing...`
|
|
697
776
|
);
|
|
698
777
|
// 使用带超时控制的压缩
|
|
699
|
-
await this._compressContext();
|
|
700
|
-
} else {
|
|
701
|
-
logger.info(`Context OK: ${totalTokens}/${this._maxContextTokens} tokens`);
|
|
778
|
+
await this._compressContext(sessionId);
|
|
702
779
|
}
|
|
703
780
|
|
|
704
781
|
const maxSteps = options.maxSteps || this._maxSteps;
|
|
@@ -714,6 +791,7 @@ ${truncatedContent}${truncatedNote}
|
|
|
714
791
|
model: this._aiClient,
|
|
715
792
|
instructions: this._systemPrompt,
|
|
716
793
|
tools: tools,
|
|
794
|
+
//stopWhen: stepCountIs(maxSteps),
|
|
717
795
|
prepareStep: async ({ stepNumber, messages }) =>
|
|
718
796
|
this._prepareStepForPruning(stepNumber, messages),
|
|
719
797
|
});
|
|
@@ -785,13 +863,14 @@ ${truncatedContent}${truncatedNote}
|
|
|
785
863
|
const systemPromptTokens = this._countTokens(this._systemPrompt);
|
|
786
864
|
const totalTokens = messagesTokens + toolsTokens + systemPromptTokens;
|
|
787
865
|
const limit = this._maxContextTokens * 0.7; // 降低到 70%
|
|
866
|
+
//console.log(messagesTokens,toolsTokens,systemPromptTokens,totalTokens,this._maxContextTokens)
|
|
788
867
|
// 对于流式调用,如果上下文太大,先压缩再开始
|
|
789
868
|
if (totalTokens > limit) {
|
|
790
869
|
logger.info(
|
|
791
870
|
`Context large (${totalTokens}/${this._maxContextTokens} tokens), compressing...`
|
|
792
871
|
);
|
|
793
872
|
// 流式调用时等待压缩完成(使用带超时控制的压缩)
|
|
794
|
-
await this._compressContext();
|
|
873
|
+
await this._compressContext(sessionId);
|
|
795
874
|
}
|
|
796
875
|
|
|
797
876
|
const maxSteps = options.maxSteps || this._maxSteps;
|
|
@@ -806,6 +885,7 @@ ${truncatedContent}${truncatedNote}
|
|
|
806
885
|
model: this._aiClient,
|
|
807
886
|
instructions: this._systemPrompt,
|
|
808
887
|
tools: tools,
|
|
888
|
+
//stopWhen: stepCountIs(maxSteps),
|
|
809
889
|
prepareStep: async ({ stepNumber, messages }) =>
|
|
810
890
|
this._prepareStepForPruning(stepNumber, messages),
|
|
811
891
|
});
|
|
@@ -861,7 +941,7 @@ ${truncatedContent}${truncatedNote}
|
|
|
861
941
|
* @private
|
|
862
942
|
*/
|
|
863
943
|
_prepareStepForPruning(stepNumber, messages) {
|
|
864
|
-
if (messages.length <=
|
|
944
|
+
if (messages.length <= 50) {
|
|
865
945
|
return {};
|
|
866
946
|
}
|
|
867
947
|
|
|
@@ -1000,38 +1080,6 @@ ${truncatedContent}${truncatedNote}
|
|
|
1000
1080
|
return cleaned;
|
|
1001
1081
|
}
|
|
1002
1082
|
|
|
1003
|
-
/**
|
|
1004
|
-
* 清理消息格式
|
|
1005
|
-
* @private
|
|
1006
|
-
*/
|
|
1007
|
-
_cleanMessages(messages) {
|
|
1008
|
-
return messages.map((msg) => {
|
|
1009
|
-
if (!msg || typeof msg !== 'object') {
|
|
1010
|
-
return { role: 'user', content: '' };
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
const cleaned = {
|
|
1014
|
-
role: msg.role || 'user',
|
|
1015
|
-
};
|
|
1016
|
-
|
|
1017
|
-
if (Array.isArray(msg.content)) {
|
|
1018
|
-
cleaned.content = msg.content;
|
|
1019
|
-
} else if (typeof msg.content === 'string') {
|
|
1020
|
-
cleaned.content = msg.content;
|
|
1021
|
-
} else if (typeof msg.content === 'object' && msg.content !== null) {
|
|
1022
|
-
// 对象类型的 content(如 tool result),转为字符串
|
|
1023
|
-
cleaned.content =
|
|
1024
|
-
typeof msg.content === 'object' && msg.content.content !== undefined
|
|
1025
|
-
? String(msg.content.content)
|
|
1026
|
-
: JSON.stringify(msg.content);
|
|
1027
|
-
} else {
|
|
1028
|
-
cleaned.content = msg.text || msg.input || '';
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
return cleaned;
|
|
1032
|
-
});
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
1083
|
/**
|
|
1036
1084
|
* 销毁
|
|
1037
1085
|
*/
|
package/src/core/agent.js
CHANGED
|
@@ -53,10 +53,6 @@ class Agent extends EventEmitter {
|
|
|
53
53
|
// 子Agent管理
|
|
54
54
|
this._subAgents = new Map();
|
|
55
55
|
|
|
56
|
-
// 消息队列(用于 pushMessage)
|
|
57
|
-
this._messageQueue = [];
|
|
58
|
-
this._isProcessingQueue = false;
|
|
59
|
-
|
|
60
56
|
// System prompt 构建器
|
|
61
57
|
this._systemPromptBuilder = new SystemPromptBuilder();
|
|
62
58
|
this._registerDefaultPromptParts();
|
|
@@ -734,10 +730,6 @@ class Agent extends EventEmitter {
|
|
|
734
730
|
* 发送消息
|
|
735
731
|
*/
|
|
736
732
|
async chat(message, options = {}) {
|
|
737
|
-
if (this._status === 'busy') {
|
|
738
|
-
throw new Error('Agent is busy');
|
|
739
|
-
}
|
|
740
|
-
|
|
741
733
|
if (this._status === 'error') {
|
|
742
734
|
this._status = 'idle';
|
|
743
735
|
}
|
|
@@ -755,21 +747,16 @@ class Agent extends EventEmitter {
|
|
|
755
747
|
|
|
756
748
|
this._syncTools();
|
|
757
749
|
|
|
750
|
+
// 通过 handler 的 enqueue 处理(自动排队)
|
|
758
751
|
const result = await this._chatHandler.chat(enhancedMessage, options);
|
|
752
|
+
|
|
759
753
|
this._status = 'idle';
|
|
760
754
|
this.emit('status', { status: 'idle' });
|
|
761
755
|
|
|
762
|
-
// 处理队列中的下一条消息
|
|
763
|
-
setImmediate(() => this._processQueue());
|
|
764
|
-
|
|
765
756
|
return result;
|
|
766
757
|
} catch (err) {
|
|
767
758
|
this._status = 'error';
|
|
768
759
|
this.emit('status', { status: 'error', error: err.message });
|
|
769
|
-
|
|
770
|
-
// 发生错误时也要处理队列
|
|
771
|
-
setImmediate(() => this._processQueue());
|
|
772
|
-
|
|
773
760
|
throw err;
|
|
774
761
|
}
|
|
775
762
|
}
|
|
@@ -789,49 +776,10 @@ class Agent extends EventEmitter {
|
|
|
789
776
|
options.sessionId = ctx.sessionId;
|
|
790
777
|
}
|
|
791
778
|
|
|
792
|
-
//
|
|
793
|
-
if (this._status === 'busy') {
|
|
794
|
-
const queuedItem = { message, options, resolve: null, reject: null };
|
|
795
|
-
const promise = new Promise((resolve, reject) => {
|
|
796
|
-
queuedItem.resolve = resolve;
|
|
797
|
-
queuedItem.reject = reject;
|
|
798
|
-
});
|
|
799
|
-
this._messageQueue.push(queuedItem);
|
|
800
|
-
// Agent busy, message queued
|
|
801
|
-
return promise;
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
// 空闲则直接处理
|
|
779
|
+
// 直接调用 chat,由 handler 的 enqueue 处理排队
|
|
805
780
|
return this.chat(message, options);
|
|
806
781
|
}
|
|
807
782
|
|
|
808
|
-
/**
|
|
809
|
-
* 处理消息队列
|
|
810
|
-
* @private
|
|
811
|
-
*/
|
|
812
|
-
async _processQueue() {
|
|
813
|
-
if (this._isProcessingQueue || this._messageQueue.length === 0) {
|
|
814
|
-
return;
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
this._isProcessingQueue = true;
|
|
818
|
-
|
|
819
|
-
// 强制设置为 idle,确保 this.chat() 能执行
|
|
820
|
-
this._status = 'idle';
|
|
821
|
-
|
|
822
|
-
while (this._messageQueue.length > 0) {
|
|
823
|
-
const item = this._messageQueue.shift();
|
|
824
|
-
try {
|
|
825
|
-
const result = await this.chat(item.message, item.options);
|
|
826
|
-
item.resolve(result);
|
|
827
|
-
} catch (err) {
|
|
828
|
-
item.reject(err);
|
|
829
|
-
}
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
this._isProcessingQueue = false;
|
|
833
|
-
}
|
|
834
|
-
|
|
835
783
|
/**
|
|
836
784
|
* 发送消息(流式)
|
|
837
785
|
*/
|
|
@@ -861,16 +809,10 @@ class Agent extends EventEmitter {
|
|
|
861
809
|
yield* this._chatHandler.chatStream(enhancedMessage, options);
|
|
862
810
|
this._status = 'idle';
|
|
863
811
|
this.emit('status', { status: 'idle' });
|
|
864
|
-
|
|
865
|
-
// 处理队列中的下一条消息
|
|
866
|
-
setImmediate(() => this._processQueue());
|
|
867
812
|
} catch (err) {
|
|
868
813
|
this._status = 'error';
|
|
869
814
|
this.emit('status', { status: 'error', error: err.message });
|
|
870
815
|
|
|
871
|
-
// 发生错误时也要处理队列
|
|
872
|
-
setImmediate(() => this._processQueue());
|
|
873
|
-
|
|
874
816
|
throw err;
|
|
875
817
|
}
|
|
876
818
|
}
|
package/src/utils/index.js
CHANGED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
No,Data Type,Keywords,Best Chart Type,Secondary Options,Color Guidance,Performance Impact,Accessibility Notes,Library Recommendation,Interactive Level
|
|
2
|
-
1,Trend Over Time,"trend, time-series, line, growth, timeline, progress",Line Chart,"Area Chart, Smooth Area",Primary: #0080FF. Multiple series: use distinct colors. Fill: 20% opacity,⚡ Excellent (optimized),✓ Clear line patterns for colorblind users. Add pattern overlays.,"Chart.js, Recharts, ApexCharts",Hover + Zoom
|
|
3
|
-
2,Compare Categories,"compare, categories, bar, comparison, ranking",Bar Chart (Horizontal or Vertical),"Column Chart, Grouped Bar",Each bar: distinct color. Category: grouped same color. Sorted: descending order,⚡ Excellent,✓ Easy to compare. Add value labels on bars for clarity.,"Chart.js, Recharts, D3.js",Hover + Sort
|
|
4
|
-
3,Part-to-Whole,"part-to-whole, pie, donut, percentage, proportion, share",Pie Chart or Donut,"Stacked Bar, Treemap",Colors: 5-6 max. Contrasting palette. Large slices first. Use labels.,⚡ Good (limit 6 slices),⚠ Hard for accessibility. Better: Stacked bar with legend. Avoid pie if >5 items.,"Chart.js, Recharts, D3.js",Hover + Drill
|
|
5
|
-
4,Correlation/Distribution,"correlation, distribution, scatter, relationship, pattern",Scatter Plot or Bubble Chart,"Heat Map, Matrix",Color axis: gradient (blue-red). Size: relative. Opacity: 0.6-0.8 to show density,⚠ Moderate (many points),⚠ Provide data table alternative. Use pattern + color distinction.,"D3.js, Plotly, Recharts",Hover + Brush
|
|
6
|
-
5,Heatmap/Intensity,"heatmap, heat-map, intensity, density, matrix",Heat Map or Choropleth,"Grid Heat Map, Bubble Heat",Gradient: Cool (blue) to Hot (red). Scale: clear legend. Divergent for ±data,⚡ Excellent (color CSS),⚠ Colorblind: Use pattern overlay. Provide numerical legend.,"D3.js, Plotly, ApexCharts",Hover + Zoom
|
|
7
|
-
6,Geographic Data,"geographic, map, location, region, geo, spatial","Choropleth Map, Bubble Map",Geographic Heat Map,Regional: single color gradient or categorized colors. Legend: clear scale,⚠ Moderate (rendering),⚠ Include text labels for regions. Provide data table alternative.,"D3.js, Mapbox, Leaflet",Pan + Zoom + Drill
|
|
8
|
-
7,Funnel/Flow,funnel/flow,"Funnel Chart, Sankey",Waterfall (for flows),Stages: gradient (starting color → ending color). Show conversion %,⚡ Good,✓ Clear stage labels + percentages. Good for accessibility if labeled.,"D3.js, Recharts, Custom SVG",Hover + Drill
|
|
9
|
-
8,Performance vs Target,performance-vs-target,Gauge Chart or Bullet Chart,"Dial, Thermometer",Performance: Red→Yellow→Green gradient. Target: marker line. Threshold colors,⚡ Good,✓ Add numerical value + percentage label beside gauge.,"D3.js, ApexCharts, Custom SVG",Hover
|
|
10
|
-
9,Time-Series Forecast,time-series-forecast,Line with Confidence Band,Ribbon Chart,Actual: solid line #0080FF. Forecast: dashed #FF9500. Band: light shading,⚡ Good,✓ Clearly distinguish actual vs forecast. Add legend.,"Chart.js, ApexCharts, Plotly",Hover + Toggle
|
|
11
|
-
10,Anomaly Detection,anomaly-detection,Line Chart with Highlights,Scatter with Alert,Normal: blue #0080FF. Anomaly: red #FF0000 circle/square marker + alert,⚡ Good,✓ Circle/marker for anomalies. Add text alert annotation.,"D3.js, Plotly, ApexCharts",Hover + Alert
|
|
12
|
-
11,Hierarchical/Nested Data,hierarchical/nested-data,Treemap,"Sunburst, Nested Donut, Icicle",Parent: distinct hues. Children: lighter shades. White borders 2-3px.,⚠ Moderate,⚠ Poor - provide table alternative. Label large areas.,"D3.js, Recharts, ApexCharts",Hover + Drilldown
|
|
13
|
-
12,Flow/Process Data,flow/process-data,Sankey Diagram,"Alluvial, Chord Diagram",Gradient from source to target. Opacity 0.4-0.6 for flows.,⚠ Moderate,⚠ Poor - provide flow table alternative.,"D3.js (d3-sankey), Plotly",Hover + Drilldown
|
|
14
|
-
13,Cumulative Changes,cumulative-changes,Waterfall Chart,"Stacked Bar, Cascade",Increases: #4CAF50. Decreases: #F44336. Start: #2196F3. End: #0D47A1.,⚡ Good,✓ Good - clear directional colors with labels.,"ApexCharts, Highcharts, Plotly",Hover
|
|
15
|
-
14,Multi-Variable Comparison,multi-variable-comparison,Radar/Spider Chart,"Parallel Coordinates, Grouped Bar",Single: #0080FF 20% fill. Multiple: distinct colors per dataset.,⚡ Good,⚠ Moderate - limit 5-8 axes. Add data table.,"Chart.js, Recharts, ApexCharts",Hover + Toggle
|
|
16
|
-
15,Stock/Trading OHLC,stock/trading-ohlc,Candlestick Chart,"OHLC Bar, Heikin-Ashi",Bullish: #26A69A. Bearish: #EF5350. Volume: 40% opacity below.,⚡ Good,⚠ Moderate - provide OHLC data table.,"Lightweight Charts (TradingView), ApexCharts",Real-time + Hover + Zoom
|
|
17
|
-
16,Relationship/Connection Data,relationship/connection-data,Network Graph,"Hierarchical Tree, Adjacency Matrix",Node types: categorical colors. Edges: #90A4AE 60% opacity.,❌ Poor (500+ nodes struggles),❌ Very Poor - provide adjacency list alternative.,"D3.js (d3-force), Vis.js, Cytoscape.js",Drilldown + Hover + Drag
|
|
18
|
-
17,Distribution/Statistical,distribution/statistical,Box Plot,"Violin Plot, Beeswarm",Box: #BBDEFB. Border: #1976D2. Median: #D32F2F. Outliers: #F44336.,⚡ Excellent,"✓ Good - include stats table (min, Q1, median, Q3, max).","Plotly, D3.js, Chart.js (plugin)",Hover
|
|
19
|
-
18,Performance vs Target (Compact),performance-vs-target-(compact),Bullet Chart,"Gauge, Progress Bar","Ranges: #FFCDD2, #FFF9C4, #C8E6C9. Performance: #1976D2. Target: black 3px.",⚡ Excellent,✓ Excellent - compact with clear values.,"D3.js, Plotly, Custom SVG",Hover
|
|
20
|
-
19,Proportional/Percentage,proportional/percentage,Waffle Chart,"Pictogram, Stacked Bar 100%",10x10 grid. 3-5 categories max. 2-3px spacing between squares.,⚡ Good,✓ Good - better than pie for accessibility.,"D3.js, React-Waffle, Custom CSS Grid",Hover
|
|
21
|
-
20,Hierarchical Proportional,hierarchical-proportional,Sunburst Chart,"Treemap, Icicle, Circle Packing",Center to outer: darker to lighter. 15-20% lighter per level.,⚠ Moderate,⚠ Poor - provide hierarchy table alternative.,"D3.js (d3-hierarchy), Recharts, ApexCharts",Drilldown + Hover
|
|
22
|
-
21,Root Cause Analysis,"root cause, decomposition, tree, hierarchy, drill-down, ai-split",Decomposition Tree,"Decision Tree, Flow Chart",Nodes: #2563EB (Primary) vs #EF4444 (Negative impact). Connectors: Neutral grey.,⚠ Moderate (calculation heavy),✓ clear hierarchy. Allow keyboard navigation for nodes.,"Power BI (native), React-Flow, Custom D3.js",Drill + Expand
|
|
23
|
-
22,3D Spatial Data,"3d, spatial, immersive, terrain, molecular, volumetric",3D Scatter/Surface Plot,"Volumetric Rendering, Point Cloud",Depth cues: lighting/shading. Z-axis: color gradient (cool to warm).,❌ Heavy (WebGL required),❌ Poor - requires alternative 2D view or data table.,"Three.js, Deck.gl, Plotly 3D",Rotate + Zoom + VR
|
|
24
|
-
23,Real-Time Streaming,"streaming, real-time, ticker, live, velocity, pulse",Streaming Area Chart,"Ticker Tape, Moving Gauge",Current: Bright Pulse (#00FF00). History: Fading opacity. Grid: Dark.,⚡ Optimized (canvas/webgl),⚠ Flashing elements - provide pause button. High contrast.,Smoothed D3.js, CanvasJS, SciChart,Real-time + Pause
|
|
25
|
-
24,Sentiment/Emotion,"sentiment, emotion, nlp, opinion, feeling",Word Cloud with Sentiment,"Sentiment Arc, Radar Chart",Positive: #22C55E. Negative: #EF4444. Neutral: #94A3B8. Size = Frequency.,⚡ Good,⚠ Word clouds poor for screen readers. Use list view.,"D3-cloud, Highcharts, Nivo",Hover + Filter
|
|
26
|
-
25,Process Mining,"process, mining, variants, path, bottleneck, log",Process Map / Graph,"Directed Acyclic Graph (DAG), Petri Net",Happy path: #10B981 (Thick). Deviations: #F59E0B (Thin). Bottlenecks: #EF4444.,⚠ Moderate to Heavy,⚠ Complex graphs hard to navigate. Provide path summary.,"React-Flow, Cytoscape.js, Recharts",Drag + Node-Click
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
No,Product Type,Keywords,Primary (Hex),Secondary (Hex),CTA (Hex),Background (Hex),Text (Hex),Border (Hex),Notes
|
|
2
|
-
1,SaaS (General),"saas, general",#2563EB,#3B82F6,#F97316,#F8FAFC,#1E293B,#E2E8F0,Trust blue + accent contrast
|
|
3
|
-
2,Micro SaaS,"micro, saas",#2563EB,#3B82F6,#F97316,#F8FAFC,#1E293B,#E2E8F0,Vibrant primary + white space
|
|
4
|
-
3,E-commerce,commerce,#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Brand primary + success green
|
|
5
|
-
4,E-commerce Luxury,"commerce, luxury",#1C1917,#44403C,#CA8A04,#FAFAF9,#0C0A09,#D6D3D1,Premium colors + minimal accent
|
|
6
|
-
5,Service Landing Page,"service, landing, page",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Brand primary + trust colors
|
|
7
|
-
6,B2B Service,"b2b, service",#0F172A,#334155,#0369A1,#F8FAFC,#020617,#E2E8F0,Professional blue + neutral grey
|
|
8
|
-
7,Financial Dashboard,"financial, dashboard",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Dark bg + red/green alerts + trust blue
|
|
9
|
-
8,Analytics Dashboard,"analytics, dashboard",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Cool→Hot gradients + neutral grey
|
|
10
|
-
9,Healthcare App,"healthcare, app",#0891B2,#22D3EE,#059669,#ECFEFF,#164E63,#A5F3FC,Calm blue + health green + trust
|
|
11
|
-
10,Educational App,"educational, app",#4F46E5,#818CF8,#F97316,#EEF2FF,#1E1B4B,#C7D2FE,Playful colors + clear hierarchy
|
|
12
|
-
11,Creative Agency,"creative, agency",#EC4899,#F472B6,#06B6D4,#FDF2F8,#831843,#FBCFE8,Bold primaries + artistic freedom
|
|
13
|
-
12,Portfolio/Personal,"portfolio, personal",#18181B,#3F3F46,#2563EB,#FAFAFA,#09090B,#E4E4E7,Brand primary + artistic interpretation
|
|
14
|
-
13,Gaming,gaming,#7C3AED,#A78BFA,#F43F5E,#0F0F23,#E2E8F0,#4C1D95,Vibrant + neon + immersive colors
|
|
15
|
-
14,Government/Public Service,"government, public, service",#0F172A,#334155,#0369A1,#F8FAFC,#020617,#E2E8F0,Professional blue + high contrast
|
|
16
|
-
15,Fintech/Crypto,"fintech, crypto",#F59E0B,#FBBF24,#8B5CF6,#0F172A,#F8FAFC,#334155,Dark tech colors + trust + vibrant accents
|
|
17
|
-
16,Social Media App,"social, media, app",#2563EB,#60A5FA,#F43F5E,#F8FAFC,#1E293B,#DBEAFE,Vibrant + engagement colors
|
|
18
|
-
17,Productivity Tool,"productivity, tool",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Clear hierarchy + functional colors
|
|
19
|
-
18,Design System/Component Library,"design, system, component, library",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Clear hierarchy + code-like structure
|
|
20
|
-
19,AI/Chatbot Platform,"chatbot, platform",#7C3AED,#A78BFA,#06B6D4,#FAF5FF,#1E1B4B,#DDD6FE,Neutral + AI Purple (#6366F1)
|
|
21
|
-
20,NFT/Web3 Platform,"nft, web3, platform",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Dark + Neon + Gold (#FFD700)
|
|
22
|
-
21,Creator Economy Platform,"creator, economy, platform",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Vibrant + Brand colors
|
|
23
|
-
22,Sustainability/ESG Platform,"sustainability, esg, platform",#7C3AED,#A78BFA,#06B6D4,#FAF5FF,#1E1B4B,#DDD6FE,Green (#228B22) + Earth tones
|
|
24
|
-
23,Remote Work/Collaboration Tool,"remote, work, collaboration, tool",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Calm Blue + Neutral grey
|
|
25
|
-
24,Mental Health App,"mental, health, app",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Calm Pastels + Trust colors
|
|
26
|
-
25,Pet Tech App,"pet, tech, app",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Playful + Warm colors
|
|
27
|
-
26,Smart Home/IoT Dashboard,"smart, home, iot, dashboard",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Dark + Status indicator colors
|
|
28
|
-
27,EV/Charging Ecosystem,"charging, ecosystem",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Electric Blue (#009CD1) + Green
|
|
29
|
-
28,Subscription Box Service,"subscription, box, service",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Brand + Excitement colors
|
|
30
|
-
29,Podcast Platform,"podcast, platform",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Dark + Audio waveform accents
|
|
31
|
-
30,Dating App,"dating, app",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Warm + Romantic (Pink/Red gradients)
|
|
32
|
-
31,Micro-Credentials/Badges Platform,"micro, credentials, badges, platform",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Trust Blue + Gold (#FFD700)
|
|
33
|
-
32,Knowledge Base/Documentation,"knowledge, base, documentation",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Clean hierarchy + minimal color
|
|
34
|
-
33,Hyperlocal Services,"hyperlocal, services",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Location markers + Trust colors
|
|
35
|
-
34,Beauty/Spa/Wellness Service,"beauty, spa, wellness, service",#10B981,#34D399,#8B5CF6,#ECFDF5,#064E3B,#A7F3D0,Soft pastels (Pink #FFB6C1 Sage #90EE90) + Cream + Gold accents
|
|
36
|
-
35,Luxury/Premium Brand,"luxury, premium, brand",#1C1917,#44403C,#CA8A04,#FAFAF9,#0C0A09,#D6D3D1,Black + Gold (#FFD700) + White + Minimal accent
|
|
37
|
-
36,Restaurant/Food Service,"restaurant, food, service",#DC2626,#F87171,#CA8A04,#FEF2F2,#450A0A,#FECACA,Warm colors (Orange Red Brown) + appetizing imagery
|
|
38
|
-
37,Fitness/Gym App,"fitness, gym, app",#DC2626,#F87171,#16A34A,#FEF2F2,#1F2937,#FECACA,Energetic (Orange #FF6B35 Electric Blue) + Dark bg
|
|
39
|
-
38,Real Estate/Property,"real, estate, property",#0F766E,#14B8A6,#0369A1,#F0FDFA,#134E4A,#99F6E4,Trust Blue (#0077B6) + Gold accents + White
|
|
40
|
-
39,Travel/Tourism Agency,"travel, tourism, agency",#EC4899,#F472B6,#06B6D4,#FDF2F8,#831843,#FBCFE8,Vibrant destination colors + Sky Blue + Warm accents
|
|
41
|
-
40,Hotel/Hospitality,"hotel, hospitality",#1E3A8A,#3B82F6,#CA8A04,#F8FAFC,#1E40AF,#BFDBFE,Warm neutrals + Gold (#D4AF37) + Brand accent
|
|
42
|
-
41,Wedding/Event Planning,"wedding, event, planning",#7C3AED,#A78BFA,#F97316,#FAF5FF,#4C1D95,#DDD6FE,Soft Pink (#FFD6E0) + Gold + Cream + Sage
|
|
43
|
-
42,Legal Services,"legal, services",#1E3A8A,#1E40AF,#B45309,#F8FAFC,#0F172A,#CBD5E1,Navy Blue (#1E3A5F) + Gold + White
|
|
44
|
-
43,Insurance Platform,"insurance, platform",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Trust Blue (#0066CC) + Green (security) + Neutral
|
|
45
|
-
44,Banking/Traditional Finance,"banking, traditional, finance",#0F766E,#14B8A6,#0369A1,#F0FDFA,#134E4A,#99F6E4,Navy (#0A1628) + Trust Blue + Gold accents
|
|
46
|
-
45,Online Course/E-learning,"online, course, learning",#0D9488,#2DD4BF,#EA580C,#F0FDFA,#134E4A,#5EEAD4,Vibrant learning colors + Progress green
|
|
47
|
-
46,Non-profit/Charity,"non, profit, charity",#0891B2,#22D3EE,#F97316,#ECFEFF,#164E63,#A5F3FC,Cause-related colors + Trust + Warm
|
|
48
|
-
47,Music Streaming,"music, streaming",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Dark (#121212) + Vibrant accents + Album art colors
|
|
49
|
-
48,Video Streaming/OTT,"video, streaming, ott",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Dark bg + Content poster colors + Brand accent
|
|
50
|
-
49,Job Board/Recruitment,"job, board, recruitment",#0F172A,#334155,#0369A1,#F8FAFC,#020617,#E2E8F0,Professional Blue + Success Green + Neutral
|
|
51
|
-
50,Marketplace (P2P),"marketplace, p2p",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Trust colors + Category colors + Success green
|
|
52
|
-
51,Logistics/Delivery,"logistics, delivery",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Blue (#2563EB) + Orange (tracking) + Green (delivered)
|
|
53
|
-
52,Agriculture/Farm Tech,"agriculture, farm, tech",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Earth Green (#4A7C23) + Brown + Sky Blue
|
|
54
|
-
53,Construction/Architecture,"construction, architecture",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Grey (#4A4A4A) + Orange (safety) + Blueprint Blue
|
|
55
|
-
54,Automotive/Car Dealership,"automotive, car, dealership",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Brand colors + Metallic accents + Dark/Light
|
|
56
|
-
55,Photography Studio,"photography, studio",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Black + White + Minimal accent
|
|
57
|
-
56,Coworking Space,"coworking, space",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Energetic colors + Wood tones + Brand accent
|
|
58
|
-
57,Cleaning Service,"cleaning, service",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Fresh Blue (#00B4D8) + Clean White + Green
|
|
59
|
-
58,Home Services (Plumber/Electrician),"home, services, plumber, electrician",#0F172A,#334155,#0369A1,#F8FAFC,#020617,#E2E8F0,Trust Blue + Safety Orange + Professional grey
|
|
60
|
-
59,Childcare/Daycare,"childcare, daycare",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Playful pastels + Safe colors + Warm accents
|
|
61
|
-
60,Senior Care/Elderly,"senior, care, elderly",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Calm Blue + Warm neutrals + Large text
|
|
62
|
-
61,Medical Clinic,"medical, clinic",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Medical Blue (#0077B6) + Trust White + Calm Green
|
|
63
|
-
62,Pharmacy/Drug Store,"pharmacy, drug, store",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Pharmacy Green + Trust Blue + Clean White
|
|
64
|
-
63,Dental Practice,"dental, practice",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Fresh Blue + White + Smile Yellow accent
|
|
65
|
-
64,Veterinary Clinic,"veterinary, clinic",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Caring Blue + Pet-friendly colors + Warm accents
|
|
66
|
-
65,Florist/Plant Shop,"florist, plant, shop",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Natural Green + Floral pinks/purples + Earth tones
|
|
67
|
-
66,Bakery/Cafe,"bakery, cafe",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Warm Brown + Cream + Appetizing accents
|
|
68
|
-
67,Coffee Shop,"coffee, shop",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Coffee Brown (#6F4E37) + Cream + Warm accents
|
|
69
|
-
68,Brewery/Winery,"brewery, winery",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Deep amber/burgundy + Gold + Craft aesthetic
|
|
70
|
-
69,Airline,airline,#7C3AED,#A78BFA,#06B6D4,#FAF5FF,#1E1B4B,#DDD6FE,Sky Blue + Brand colors + Trust accents
|
|
71
|
-
70,News/Media Platform,"news, media, platform",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Brand colors + High contrast + Category colors
|
|
72
|
-
71,Magazine/Blog,"magazine, blog",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Editorial colors + Brand primary + Clean white
|
|
73
|
-
72,Freelancer Platform,"freelancer, platform",#0F172A,#334155,#0369A1,#F8FAFC,#020617,#E2E8F0,Professional Blue + Success Green + Neutral
|
|
74
|
-
73,Consulting Firm,"consulting, firm",#0F172A,#334155,#0369A1,#F8FAFC,#020617,#E2E8F0,Navy + Gold + Professional grey
|
|
75
|
-
74,Marketing Agency,"marketing, agency",#EC4899,#F472B6,#06B6D4,#FDF2F8,#831843,#FBCFE8,Bold brand colors + Creative freedom
|
|
76
|
-
75,Event Management,"event, management",#7C3AED,#A78BFA,#F97316,#FAF5FF,#4C1D95,#DDD6FE,Event theme colors + Excitement accents
|
|
77
|
-
76,Conference/Webinar Platform,"conference, webinar, platform",#0F172A,#334155,#0369A1,#F8FAFC,#020617,#E2E8F0,Professional Blue + Video accent + Brand
|
|
78
|
-
77,Membership/Community,"membership, community",#7C3AED,#A78BFA,#F97316,#FAF5FF,#4C1D95,#DDD6FE,Community brand colors + Engagement accents
|
|
79
|
-
78,Newsletter Platform,"newsletter, platform",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Brand primary + Clean white + CTA accent
|
|
80
|
-
79,Digital Products/Downloads,"digital, products, downloads",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Product category colors + Brand + Success green
|
|
81
|
-
80,Church/Religious Organization,"church, religious, organization",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Warm Gold + Deep Purple/Blue + White
|
|
82
|
-
81,Sports Team/Club,"sports, team, club",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Team colors + Energetic accents
|
|
83
|
-
82,Museum/Gallery,"museum, gallery",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Art-appropriate neutrals + Exhibition accents
|
|
84
|
-
83,Theater/Cinema,"theater, cinema",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Dark + Spotlight accents + Gold
|
|
85
|
-
84,Language Learning App,"language, learning, app",#0D9488,#2DD4BF,#EA580C,#F0FDFA,#134E4A,#5EEAD4,Playful colors + Progress indicators + Country flags
|
|
86
|
-
85,Coding Bootcamp,"coding, bootcamp",#3B82F6,#60A5FA,#F97316,#F8FAFC,#1E293B,#E2E8F0,Code editor colors + Brand + Success green
|
|
87
|
-
86,Cybersecurity Platform,"cybersecurity, security, cyber, hacker",#00FF41,#0D0D0D,#00FF41,#000000,#E0E0E0,#1F1F1F,Matrix Green + Deep Black + Terminal feel
|
|
88
|
-
87,Developer Tool / IDE,"developer, tool, ide, code, dev",#3B82F6,#1E293B,#2563EB,#0F172A,#F1F5F9,#334155,Dark syntax theme colors + Blue focus
|
|
89
|
-
88,Biotech / Life Sciences,"biotech, science, biology, medical",#0EA5E9,#0284C7,#10B981,#F8FAFC,#0F172A,#E2E8F0,Sterile White + DNA Blue + Life Green
|
|
90
|
-
89,Space Tech / Aerospace,"space, aerospace, tech, futuristic",#FFFFFF,#94A3B8,#3B82F6,#0B0B10,#F8FAFC,#1E293B,Deep Space Black + Star White + Metallic
|
|
91
|
-
90,Architecture / Interior,"architecture, interior, design, luxury",#171717,#404040,#D4AF37,#FFFFFF,#171717,#E5E5E5,Monochrome + Gold Accent + High Imagery
|
|
92
|
-
91,Quantum Computing,"quantum, qubit, tech",#00FFFF,#7B61FF,#FF00FF,#050510,#E0E0FF,#333344,Interference patterns + Neon + Deep Dark
|
|
93
|
-
92,Biohacking / Longevity,"bio, health, science",#FF4D4D,#4D94FF,#00E676,#F5F5F7,#1C1C1E,#E5E5EA,Biological red/blue + Clinical white
|
|
94
|
-
93,Autonomous Systems,"drone, robot, fleet",#00FF41,#008F11,#FF3333,#0D1117,#E6EDF3,#30363D,Terminal Green + Tactical Dark
|
|
95
|
-
94,Generative AI Art,"art, gen-ai, creative",#111111,#333333,#FFFFFF,#FAFAFA,#000000,#E5E5E5,Canvas Neutral + High Contrast
|
|
96
|
-
95,Spatial / Vision OS,"spatial, glass, vision",#FFFFFF,#E5E5E5,#007AFF,#888888,#000000,#FFFFFF,Glass opacity 20% + System Blue
|
|
97
|
-
96,Climate Tech,"climate, green, energy",#2E8B57,#87CEEB,#FFD700,#F0FFF4,#1A3320,#C6E6C6,Nature Green + Solar Yellow + Air Blue
|