refactor: remove redundant comments and docstrings (#6527)

* refactor: remove redundant comments and docstrings

* fix(signal): annotate async context manager as a generator
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-30 13:07:03 +08:00
1 parent cb3ba45317
commit a4d2430140
922 files changed
+406 -7738

No files matched your search

-1
View File
@@ -19,7 +19,6 @@ export function formatTokenCount(value: number): string {
return `${compact}k`
}
/** Read-only explanation of the session-owned context replayed to the agent. */
export class ContextPanel {
readonly root: BoxRenderable
private readonly stats: TextRenderable
-1
View File
@@ -96,7 +96,6 @@ function stat(edit: FileEditEvent): string {
return `+${added} -${deleted}`
}
/** Full-screen, read-only projection of file-edit events owned by the session. */
export class DiffViewer {
readonly root: BoxRenderable
private readonly header: TextRenderable
-1
View File
@@ -53,7 +53,6 @@ export function footerTelemetry(
return new StyledText([chunk(`${percentage}% context`, theme.accent, true)])
}
/** Give shortcuts visual hierarchy without turning the footer into a toolbar. */
export function footerHints(hints: readonly FooterHint[], theme: FooterHintTheme): StyledText {
const chunks: TextChunk[] = []
hints.forEach((hint, index) => {
-1
View File
@@ -26,7 +26,6 @@ interface RecoveryNoticeOptions {
onDismiss: () => void
}
/** A quiet action surface for a gateway-owned interrupted turn. */
export class RecoveryNotice {
readonly root: BoxRenderable
private readonly title: TextRenderable
-2
View File
@@ -41,7 +41,6 @@ interface RuntimeControlsOptions {
onVisibilityChange: (visible: boolean) => void
}
/** Model and workspace policy controls expose one small, mouse-optional interface. */
export class RuntimeControls {
readonly modelText: TextRenderable
readonly accessText: TextRenderable
@@ -110,7 +109,6 @@ export class RuntimeControls {
this.contextText.content = text
}
/** Warm the small settings payload while the user is reading the first frame. */
preload(): void {
void this.load().catch(() => {})
}
-1
View File
@@ -75,7 +75,6 @@ describe("UsagePanel", () => {
const split = bars.find((span) => span.text.includes("▆"))!
expect(split.fg.equals(cachedColor)).toBe(true)
expect(split.bg.equals(uncachedColor)).toBe(true)
// Every solid cell below the split is cached; the cell above is uncached.
expect(bars.filter((span) => span.fg.equals(cachedColor)).length).toBe(height === 30 ? 5 : 1)
expect(setup.captureSpans().lines.flatMap((line) => line.spans)
.filter((span) => span.bg.equals(uncachedColor)).map((span) => span.text)).toEqual(["▆▆▆"])
-1
View File
@@ -35,7 +35,6 @@ function chunk(text: string, color: ColorInput, bold = false): TextChunk {
}
}
/** A bounded, read-only view of persisted model-call usage. */
export class UsagePanel {
readonly root: BoxRenderable
private readonly body: TextRenderable