mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-05 15:31:27 +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
|
|
@ -282,7 +282,7 @@ function useCommandSuggestions(
|
|||
|
||||
if (!signal.aborted) {
|
||||
const finalSuggestions = potentialSuggestions.map((cmd) => ({
|
||||
label: cmd.name,
|
||||
label: formatSlashCommandLabel(cmd),
|
||||
value: cmd.name,
|
||||
description: cmd.description,
|
||||
commandKind: cmd.kind,
|
||||
|
|
@ -525,3 +525,14 @@ export function useSlashCompletion(props: UseSlashCompletionProps): {
|
|||
completionEnd,
|
||||
};
|
||||
}
|
||||
|
||||
function formatSlashCommandLabel(command: SlashCommand): string {
|
||||
const baseLabel = command.name;
|
||||
const altNames = command.altNames?.filter(Boolean);
|
||||
|
||||
if (!altNames || altNames.length === 0) {
|
||||
return baseLabel;
|
||||
}
|
||||
|
||||
return `${baseLabel} (${altNames.join(', ')})`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue