feat: improve project summary display with file path info

This commit is contained in:
pomelo-nwu
2025-09-10 15:46:53 +08:00
parent c0e9dceabc
commit a2d97bc09f
4 changed files with 14 additions and 3 deletions

View File

@@ -419,6 +419,7 @@ const summaryCommand: SlashCommand = {
summary: {
isPending: false,
stage: 'completed',
filePath: '.qwen/PROJECT_SUMMARY.md',
},
};
ui.addItem(completedSummaryItem, Date.now());
@@ -426,7 +427,7 @@ const summaryCommand: SlashCommand = {
return {
type: 'message',
messageType: 'info',
content: `Project summary generated and saved to .qwen/PROJECT_SUMMARY.md`,
content: '', // Empty content since we show the message in UI component
};
} catch (error) {
// Clear pending item on error

View File

@@ -14,6 +14,11 @@ interface InfoMessageProps {
}
export const InfoMessage: React.FC<InfoMessageProps> = ({ text }) => {
// Don't render anything if text is empty
if (!text || text.trim() === '') {
return null;
}
const prefix = ' ';
const prefixWidth = prefix.length;

View File

@@ -1,6 +1,6 @@
/**
* @license
* Copyright 2025 Google LLC
* Copyright 2025 Qwen
* SPDX-License-Identifier: Apache-2.0
*/
@@ -30,7 +30,11 @@ export const SummaryMessage: React.FC<SummaryDisplayProps> = ({ summary }) => {
return 'Processing summary...';
}
}
return 'Project summary generated and saved successfully!';
const baseMessage = 'Project summary generated and saved successfully!';
if (summary.filePath) {
return `${baseMessage} Saved to: ${summary.filePath}`;
}
return baseMessage;
};
const getIcon = () => {

View File

@@ -61,6 +61,7 @@ export interface CompressionProps {
export interface SummaryProps {
isPending: boolean;
stage: 'generating' | 'saving' | 'completed';
filePath?: string; // Path to the saved summary file
}
export interface HistoryItemBase {