mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
feat: improve project summary display with file path info
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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 = () => {
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user