mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 12:11:09 +00:00
Session-Level Conversation History Management (#1113)
This commit is contained in:
parent
a7abd8d09f
commit
0a75d85ac9
114 changed files with 9257 additions and 4039 deletions
|
|
@ -67,7 +67,7 @@ export const Help: React.FC<Help> = ({ commands }) => (
|
|||
<Text color={theme.text.primary}>
|
||||
<Text bold color={theme.text.accent}>
|
||||
{' '}
|
||||
/{command.name}
|
||||
{formatCommandLabel(command, '/')}
|
||||
</Text>
|
||||
{command.kind === CommandKind.MCP_PROMPT && (
|
||||
<Text color={theme.text.secondary}> [MCP]</Text>
|
||||
|
|
@ -81,7 +81,7 @@ export const Help: React.FC<Help> = ({ commands }) => (
|
|||
<Text key={subCommand.name} color={theme.text.primary}>
|
||||
<Text bold color={theme.text.accent}>
|
||||
{' '}
|
||||
{subCommand.name}
|
||||
{formatCommandLabel(subCommand)}
|
||||
</Text>
|
||||
{subCommand.description && ' - ' + subCommand.description}
|
||||
</Text>
|
||||
|
|
@ -171,3 +171,17 @@ export const Help: React.FC<Help> = ({ commands }) => (
|
|||
</Text>
|
||||
</Box>
|
||||
);
|
||||
|
||||
/**
|
||||
* Builds a display label for a slash command, including any alternate names.
|
||||
*/
|
||||
function formatCommandLabel(command: SlashCommand, prefix = ''): string {
|
||||
const altNames = command.altNames?.filter(Boolean);
|
||||
const baseLabel = `${prefix}${command.name}`;
|
||||
|
||||
if (!altNames || altNames.length === 0) {
|
||||
return baseLabel;
|
||||
}
|
||||
|
||||
return `${baseLabel} (${altNames.join(', ')})`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue