### Summary
This PR hides `<dyad-command type="refresh"></dyad-command>` tags from
generated text outputs. These elements are not intended for end users
and clutter the response text.
### Changes
- Filter out `<dyad-command>` tags from generated text.
- Ensure no regressions in rendering or formatting of user-visible
output.
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Hide dyad-command tags from chat output so internal commands never
appear in user-visible text. Updates DyadMarkdownParser to detect and
drop these tags during preprocessing, parsing, and rendering.
<!-- End of auto-generated description by cubic. -->
This commit is contained in:
committed by
GitHub
parent
1c0255ab12
commit
ebcf89ee6c
@@ -123,6 +123,7 @@ function preprocessUnclosedTags(content: string): {
|
|||||||
"dyad-edit",
|
"dyad-edit",
|
||||||
"dyad-codebase-context",
|
"dyad-codebase-context",
|
||||||
"think",
|
"think",
|
||||||
|
"dyad-command",
|
||||||
];
|
];
|
||||||
|
|
||||||
let processedContent = content;
|
let processedContent = content;
|
||||||
@@ -189,6 +190,7 @@ function parseCustomTags(content: string): ContentPiece[] {
|
|||||||
"dyad-edit",
|
"dyad-edit",
|
||||||
"dyad-codebase-context",
|
"dyad-codebase-context",
|
||||||
"think",
|
"think",
|
||||||
|
"dyad-command",
|
||||||
];
|
];
|
||||||
|
|
||||||
const tagPattern = new RegExp(
|
const tagPattern = new RegExp(
|
||||||
@@ -418,6 +420,10 @@ function renderCustomTag(
|
|||||||
// Don't render anything for dyad-chat-summary
|
// Don't render anything for dyad-chat-summary
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
case "dyad-command":
|
||||||
|
// Don't render anything for dyad-command
|
||||||
|
return null;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user