mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-02 13:40:46 +00:00
feat(insight): add shareable card and dev environment support
Add Twitter/X-optimized share card component for exporting insights as an image. Include Vite dev setup for local development with hot reload. Increase DataProcessor timeout and concurrency for better reliability with large datasets. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
d61ec772a3
commit
83dc4ca4ec
10 changed files with 1013 additions and 34 deletions
|
|
@ -45,7 +45,7 @@ import {
|
|||
|
||||
const logger = createDebugLogger('DataProcessor');
|
||||
|
||||
const CONCURRENCY_LIMIT = 2;
|
||||
const CONCURRENCY_LIMIT = 4;
|
||||
|
||||
export class DataProcessor {
|
||||
constructor(private config: Config) {}
|
||||
|
|
@ -189,7 +189,7 @@ export class DataProcessor {
|
|||
model: this.config.getModel(),
|
||||
contents: [{ role: 'user', parts: [{ text: prompt }] }],
|
||||
schema: INSIGHT_SCHEMA,
|
||||
abortSignal: AbortSignal.timeout(60000), // 1 minute timeout per session
|
||||
abortSignal: AbortSignal.timeout(600000), // 10 minute timeout per session
|
||||
});
|
||||
|
||||
if (!result || Object.keys(result).length === 0) {
|
||||
|
|
@ -383,7 +383,7 @@ export class DataProcessor {
|
|||
model: this.config.getModel(),
|
||||
contents: [{ role: 'user', parts: [{ text: prompt }] }],
|
||||
schema,
|
||||
abortSignal: AbortSignal.timeout(60000),
|
||||
abortSignal: AbortSignal.timeout(600000),
|
||||
});
|
||||
return result as T;
|
||||
} catch (error) {
|
||||
|
|
@ -627,6 +627,23 @@ export class DataProcessor {
|
|||
),
|
||||
]);
|
||||
|
||||
logger.debug(
|
||||
JSON.stringify(
|
||||
{
|
||||
impressiveWorkflows,
|
||||
projectAreas,
|
||||
futureOpportunities,
|
||||
frictionPoints,
|
||||
memorableMoment,
|
||||
improvements,
|
||||
interactionStyle,
|
||||
atAGlance,
|
||||
},
|
||||
null,
|
||||
2,
|
||||
),
|
||||
);
|
||||
|
||||
return {
|
||||
impressiveWorkflows,
|
||||
projectAreas,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue