@devries-cameron20 / composio Mirror · read-only / commits / 7a74bba36
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 13:15 UTC

fix: twoslash type checking only, no hover UI

Configure twoslash with empty renderer to validate types at build time without adding hover popup markup to the output. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Sushmithamallesh committed Jan 26, 2026 at 22:51 UTC 7a74bba36fb146a217f9aa2602c81f36d20d0034
2 files changed +9 -35
docs/app/global.css
-34
@@ -2,7 +2,6 @@
2 @import 'fumadocs-ui/css/neutral.css';
3 @import 'fumadocs-ui/css/preset.css';
4 @import 'fumadocs-openapi/css/preset.css';
5 -@import '@shikijs/twoslash/style-rich.css';
5 @import "tw-animate-css";
6
7 @custom-variant dark (&:is(.dark *));
@@ -484,36 +483,3 @@ nav a[href*="app.composio"]:focus-visible {
483 @apply bg-background text-foreground;
484 }
485 }
487 -
488 -/* ==========================================================================
489 - Twoslash - Type hover popups in code blocks
490 - ========================================================================== */
491 -
492 -:root {
493 - --twoslash-border-color: var(--color-fd-border);
494 - --twoslash-popup-bg: var(--color-fd-popover);
495 - --twoslash-popup-color: var(--color-fd-popover-foreground);
496 - --twoslash-popup-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
497 - --twoslash-docs-color: var(--color-fd-muted-foreground);
498 - --twoslash-docs-font: var(--font-sans);
499 - --twoslash-code-font: var(--font-mono);
500 -}
501 -
502 -.dark {
503 - --twoslash-popup-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
504 -}
505 -
506 -.twoslash .twoslash-popup-container {
507 - border-radius: var(--radius);
508 - max-width: 540px;
509 -}
510 -
511 -.twoslash .twoslash-popup-code {
512 - font-size: 0.8125rem;
513 - line-height: 1.5;
514 -}
515 -
516 -.twoslash .twoslash-popup-docs {
517 - font-size: 0.8125rem;
518 - line-height: 1.5;
519 -}
docs/source.config.ts
+9 -1
@@ -89,7 +89,7 @@ export default defineConfig({
89 light: 'github-light',
90 dark: 'github-dark',
91 },
92 - // Twoslash disabled in dev (heap memory issues), enabled in build/CI
92 + // Twoslash for type checking only - no hover UI
93 transformers:
94 process.env.NODE_ENV === 'production'
95 ? [
@@ -98,6 +98,14 @@ export default defineConfig({
98 typesCache: createFileSystemTypesCache({
99 dir: '.next/cache/twoslash',
100 }),
101 + renderer: {
102 + // Empty renderer - type checks but renders nothing
103 + nodeStaticInfo: () => ({}),
104 + nodeError: () => ({}),
105 + nodeQuery: () => ({}),
106 + nodeCompletion: () => ({}),
107 + nodesHighlight: () => ({}),
108 + },
109 }),
110 ]
111 : [],