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: { summary: {
isPending: false, isPending: false,
stage: 'completed', stage: 'completed',
filePath: '.qwen/PROJECT_SUMMARY.md',
}, },
}; };
ui.addItem(completedSummaryItem, Date.now()); ui.addItem(completedSummaryItem, Date.now());
@@ -426,7 +427,7 @@ const summaryCommand: SlashCommand = {
return { return {
type: 'message', type: 'message',
messageType: 'info', 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) { } catch (error) {
// Clear pending item on error // Clear pending item on error

View File

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

View File

@@ -1,6 +1,6 @@
/** /**
* @license * @license
* Copyright 2025 Google LLC * Copyright 2025 Qwen
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@@ -30,7 +30,11 @@ export const SummaryMessage: React.FC<SummaryDisplayProps> = ({ summary }) => {
return 'Processing 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 = () => { const getIcon = () => {

View File

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