diff --git a/website/scripts/check-built-site.mjs b/website/scripts/check-built-site.mjs index d5af620..b262302 100644 --- a/website/scripts/check-built-site.mjs +++ b/website/scripts/check-built-site.mjs @@ -66,6 +66,20 @@ const sharedTuiRegionMarkers = [ 'data-tui-region="footer"', ]; +const realCapabilityTuiMarkers = [ + 'data-real-tui-scene="hitl"', + 'a3s-real-user-message', + 'a3s-real-tool-line', + '◇ high', + 'default mode', +]; + +const obsoleteCapabilityUiMarkers = [ + 'a3s-capability-player-intro', + 'a3s-capability-tui-plan', + 'HUMAN APPROVAL REQUIRED', +]; + for (const homepage of ['index.html', 'en/index.html']) { const html = await readFile(path.join(outputRoot, homepage), 'utf8'); for (const marker of capabilityMarkers) { @@ -84,6 +98,22 @@ for (const homepage of ['index.html', 'en/index.html']) { ); } } + + for (const marker of realCapabilityTuiMarkers) { + if (!html.includes(marker)) { + throw new Error( + `${homepage} is missing real capability TUI marker: ${marker}`, + ); + } + } + + for (const marker of obsoleteCapabilityUiMarkers) { + if (html.includes(marker)) { + throw new Error( + `${homepage} still renders obsolete capability UI: ${marker}`, + ); + } + } } const brokenReferences = []; diff --git a/website/scripts/check-doc-accuracy.mjs b/website/scripts/check-doc-accuracy.mjs index a8b695c..136673a 100644 --- a/website/scripts/check-doc-accuracy.mjs +++ b/website/scripts/check-doc-accuracy.mjs @@ -88,6 +88,7 @@ const [ rspressConfig, homeLayout, tuiRuntimeDemo, + tuiWelcomeBanner, ] = await Promise.all([ readFile(path.join(repositoryRoot, 'core', 'Cargo.toml'), 'utf8'), readFile(path.join(repositoryRoot, 'sdk', 'node', 'package.json'), 'utf8'), @@ -105,6 +106,10 @@ const [ path.join(websiteRoot, 'theme', 'components', 'TuiRuntimeDemo.tsx'), 'utf8', ), + readFile( + path.join(websiteRoot, 'theme', 'components', 'TuiWelcomeBanner.tsx'), + 'utf8', + ), ]); const sourceVersions = new Map([ @@ -166,7 +171,7 @@ if (JSON.stringify(versions) !== JSON.stringify(configuredVersions)) { ); } if ( - ![homeLayout, tuiRuntimeDemo].some((source) => + ![homeLayout, tuiRuntimeDemo, tuiWelcomeBanner].some((source) => source.includes(`a3s-code ${manifest.current}`), ) ) { diff --git a/website/theme/capability-responsive.css b/website/theme/capability-responsive.css index 454d5e3..f3ecb6a 100644 --- a/website/theme/capability-responsive.css +++ b/website/theme/capability-responsive.css @@ -1,6 +1,6 @@ @media (max-width: 1100px) { .a3s-capability-console { - grid-template-columns: 230px minmax(0, 1fr); + grid-template-columns: 225px minmax(0, 1fr); } .a3s-capability-selector > button { @@ -15,10 +15,8 @@ height: 31px; } - .a3s-capability-player-intro { - align-items: flex-start; - grid-template-columns: 1fr; - gap: 14px; + .a3s-real-tool-line > header { + grid-template-columns: 15px auto minmax(0, 1fr); } } @@ -66,10 +64,6 @@ .a3s-capability-selector > button > em { display: none; } - - .a3s-capability-player-stage { - min-height: 390px; - } } @media (max-width: 640px) { @@ -101,103 +95,183 @@ font-size: 10px; } - .a3s-capability-player-intro { - gap: 9px; + .a3s-capability-player > .a3s-tui-terminal { + padding: 14px 11px 8px; } - .a3s-capability-player-intro h3 { - font-size: 16px; + .a3s-capability-player.is-fullscreen > .a3s-tui-terminal { + padding: 5px; } - .a3s-capability-player-stage { - min-height: 360px; + .a3s-real-transcript { + gap: 14px; } - .a3s-capability-scene { - min-height: 350px; - padding: 0; + .a3s-real-user-message { + padding: 11px 10px; } - .a3s-capability-call, - .a3s-runtime-tool-call { - grid-template-columns: auto minmax(0, 1fr); + .a3s-real-user-message > p, + .a3s-real-tool-line > header > strong { + font-size: 10.5px; } - .a3s-capability-call em { - display: none; + .a3s-real-tool-line > header > code { + font-size: 9.5px; } - .a3s-progressive-endpoint span { + .a3s-real-tool-line > div > p > code { + font-size: 9px; + } + + .a3s-real-approval > ol > li > span, + .a3s-real-approval > ol > li > b, + .a3s-real-approval > ol > li > i, + .a3s-real-approval > ol > li > p, + .a3s-real-approval-detail > span, + .a3s-real-approval-detail > code { + font-size: 9.5px; + } + + .a3s-real-runtime-tracker > header { + grid-template-columns: 13px minmax(0, 1fr); + } + + .a3s-real-runtime-tracker > header > small { + padding-left: 20px; + grid-column: 1 / -1; + } + + .a3s-real-runtime-tracker > div > p { + grid-template-columns: 13px auto minmax(0, 1fr); + } + + .a3s-real-runtime-tracker > div > p > small { display: none; } - .a3s-progressive-steps > div { - grid-template-columns: 54px 14px minmax(0, 1fr); + .a3s-real-ide { + grid-template-rows: minmax(0, 1fr) 52px; + gap: 3px; } - .a3s-intelligence-workbench { - min-height: 0; - grid-template-columns: 1fr; + .a3s-real-ide-main, + .a3s-real-ide-footer { + gap: 3px; } - .a3s-intelligence-code { - border-right: 0; - border-bottom: 1px solid #29323c; + .a3s-real-ide-main { + grid-template-columns: minmax(105px, 0.31fr) minmax(0, 0.69fr); } - .a3s-intelligence-workbench > aside { - min-height: 174px; + .a3s-real-ide-frame { + border-radius: 5px; + grid-template-rows: 24px minmax(0, 1fr); } - .a3s-intelligence-workbench li { - min-height: 34px; + .a3s-real-ide-frame > header { + padding: 0 6px; + font-size: 8.5px; } - .a3s-capability-scene--intelligence { - min-height: 0; + .a3s-real-ide-tree > div { + padding: 4px 2px; } - .a3s-capability-scene--intelligence > footer { - flex-wrap: wrap; + .a3s-real-ide-tree p { + min-height: 23px; + padding: 0 3px; + grid-template-columns: 11px minmax(0, 1fr); + gap: 3px; + font-size: 8.5px; } - .a3s-capability-scene--intelligence > footer code { - display: none; + .a3s-real-ide-tree p:nth-child(n + 2) { + padding-left: 8px; } - .a3s-ctx-results > div { - grid-template-columns: 18px 48px minmax(0, 1fr); + .a3s-real-ide-code > p { + min-height: 24px; + grid-template-columns: 28px minmax(0, 1fr); } - .a3s-ctx-results > div small { - display: none; + .a3s-real-ide-code > p > span { + padding-right: 5px; + font-size: 8px; } - .a3s-ctx-actions { - grid-template-columns: 1fr; + .a3s-real-ide-code > p > code, + .a3s-real-ide-results > p { + font-size: 8.5px; } - .a3s-capability-tui-tag:nth-of-type(n + 4) { - display: none; + .a3s-real-ide-footer .a3s-real-ide-frame > p { + padding-right: 5px; + padding-left: 5px; + font-size: 7.5px; + } + + .a3s-real-ctx-results > div > p { + grid-template-columns: 23px minmax(0, 1fr); + } + + .a3s-real-ctx-results > div > p > b, + .a3s-real-ctx-results > div > p > strong, + .a3s-real-notice { + font-size: 9.5px; + } + + .a3s-real-ctx-results > div > small, + .a3s-real-ctx-results > footer { + padding-left: 28px; + font-size: 8.5px; + } +} + +@media (max-width: 390px) { + .a3s-real-approval > ol > li { + grid-template-columns: 10px 11px 12px minmax(0, 1fr); + gap: 3px; + } + + .a3s-real-approval > ol > li > p { + font-size: 8.7px; + } + + .a3s-real-tool-line > header { + grid-template-columns: 13px auto minmax(0, 1fr); + gap: 3px; + } + + .a3s-real-tool-line > header > strong { + font-size: 9.5px; + } + + .a3s-real-tool-line > header > code { + font-size: 8.7px; + } + + .a3s-real-ide-main { + grid-template-columns: 96px minmax(0, 1fr); + } + + .a3s-real-ide-footer { + grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); + } + + .a3s-real-ctx-results > div > p > strong, + .a3s-real-ctx-results > div > small { + white-space: normal; + } + + .a3s-real-ctx-results > footer { + white-space: normal; } } @media (prefers-reduced-motion: reduce) { - .a3s-capability-player-stage, - .a3s-capability-tui-plan li.is-active > i, - .a3s-progressive-steps .is-active i, - .a3s-progressive-view.is-ready, - .a3s-runtime-batch > div.is-running > i b, - .a3s-ctx-actions > div.is-ready { - animation: none; - } - - .a3s-capability-selector > button, - .a3s-capability-selector > button::after, - .a3s-capability-approval, - .a3s-progressive-steps > div, - .a3s-runtime-batch > div > i b, - .a3s-intelligence-workbench li { - transition: none; + .a3s-capability-console, + .a3s-capability-selector { + scroll-behavior: auto; } } diff --git a/website/theme/capability-scenes.css b/website/theme/capability-scenes.css index b128096..859266f 100644 --- a/website/theme/capability-scenes.css +++ b/website/theme/capability-scenes.css @@ -1,628 +1,607 @@ -.a3s-progressive-query { +.a3s-real-transcript { display: flex; - min-height: 48px; - padding: 0 12px; - border: 1px solid #2d3742; - border-radius: 5px; - background: rgba(15, 20, 27, 0.88); - align-items: center; - gap: 12px; -} - -.a3s-progressive-query span { - color: #77859a; - font-size: 7px; - letter-spacing: 0.08em; - text-transform: uppercase; + min-width: 0; + height: 100%; + flex-direction: column; + gap: 18px; + font-family: var(--a3s-mono); } -.a3s-progressive-query p { +.a3s-real-user-message { + display: grid; + min-width: 0; margin: 0; - color: #d8dfe8; - font-size: 9px; -} - -.a3s-progressive-endpoint { - display: flex; - margin: 13px 0 9px; - align-items: center; - justify-content: space-between; - gap: 10px; + padding: 13px 14px; + background: rgb(49, 53, 58); + color: rgb(220, 220, 220); + grid-template-columns: 14px minmax(0, 1fr); + align-items: start; + gap: 6px; + animation: a3s-real-row-in 180ms ease-out both; } -.a3s-progressive-endpoint code { - color: #8b9dff; - font-size: 8px; +.a3s-real-user-message > span { + color: rgb(220, 220, 220); + font-size: 12px; + font-weight: 700; + line-height: 1.55; + opacity: 0.72; } -.a3s-progressive-endpoint span { - color: #617080; - font-size: 7px; +.a3s-real-user-message > p { + min-width: 0; + margin: 0; + color: inherit; + font-size: 11.5px; + line-height: 1.55; + overflow-wrap: anywhere; } -.a3s-progressive-steps { - overflow: hidden; - border: 1px solid #2a3440; - border-radius: 6px; - background: rgba(10, 14, 19, 0.9); +.a3s-real-tool-stack { + display: flex; + min-width: 0; + flex-direction: column; + gap: 13px; } -.a3s-progressive-steps > div { +.a3s-real-tool-line { display: grid; - min-height: 48px; - padding: 0 12px; - border-bottom: 1px solid #252e38; - color: #596573; - grid-template-columns: 58px 18px minmax(0, 1fr); - align-items: center; - gap: 8px; - transition: - background 180ms ease, - color 180ms ease; + min-width: 0; + color: rgb(220, 220, 220); + gap: 4px; + animation: a3s-real-row-in 180ms ease-out both; } -.a3s-progressive-steps > div:last-child { - border-bottom: 0; +.a3s-real-tool-line > header { + display: grid; + min-width: 0; + min-height: 18px; + grid-template-columns: 15px auto minmax(0, 1fr); + align-items: baseline; + gap: 5px; } -.a3s-progressive-steps > div.is-active { - background: rgba(139, 157, 255, 0.065); - color: #dce1ff; +.a3s-real-tool-line > header > i { + color: rgb(120, 123, 125); + font-size: 12px; + font-style: normal; + text-align: center; } -.a3s-progressive-steps > div.is-complete { - color: #919bad; +.a3s-real-tool-line > header > strong { + color: rgb(220, 220, 220); + font-size: 11.5px; + font-weight: 650; + line-height: 1.45; + white-space: nowrap; } -.a3s-progressive-steps b { - color: inherit; - font-size: 8px; - font-weight: 550; +.a3s-real-tool-line > header > code { + overflow: hidden; + min-width: 0; + color: rgb(220, 220, 220); + font-family: inherit; + font-size: 11px; + line-height: 1.45; + text-overflow: ellipsis; + white-space: nowrap; } -.a3s-progressive-steps i { - width: 6px; - height: 6px; - border: 1px solid #45505e; - border-radius: 50%; +.a3s-real-tool-line > div { + display: grid; + min-width: 0; + gap: 2px; } -.a3s-progressive-steps .is-active i { - border-color: #8b9dff; - background: #8b9dff; - box-shadow: 0 0 9px rgba(139, 157, 255, 0.6); - animation: a3s-capability-pulse 650ms ease-in-out infinite alternate; +.a3s-real-tool-line > div > p { + display: grid; + min-width: 0; + min-height: 16px; + margin: 0; + color: rgb(120, 123, 125); + grid-template-columns: 24px minmax(0, 1fr); + gap: 2px; } -.a3s-progressive-steps .is-complete i { - border-color: #6e79c8; - background: #4b568f; +.a3s-real-tool-line > div > p > span { + color: rgb(95, 99, 104); + text-align: right; } -.a3s-progressive-steps code { +.a3s-real-tool-line > div > p > code { overflow: hidden; color: inherit; - font-size: 8px; + font-family: inherit; + font-size: 10.5px; + line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; } -.a3s-progressive-view { - display: flex; - margin-top: 10px; - min-height: 48px; - padding: 0 12px; - border: 1px dashed #303947; - border-radius: 6px; - color: #5d6876; - align-items: center; - gap: 10px; +.a3s-real-tool-line.is-active > header > i { + color: rgb(125, 182, 255); + animation: a3s-real-pulse 700ms ease-in-out infinite alternate; } -.a3s-progressive-view > span { - display: grid; - width: 25px; - height: 25px; - border: 1px solid #303947; - border-radius: 5px; - place-items: center; +.a3s-real-tool-line.is-success > header > i, +.a3s-real-tool-line > div > p.is-success { + color: rgb(78, 201, 139); } -.a3s-progressive-view > div { - display: flex; - flex-direction: column; - gap: 2px; +.a3s-real-tool-line.is-warning > header > i { + color: rgb(215, 168, 75); } -.a3s-progressive-view small { - font-size: 6px; - letter-spacing: 0.08em; +.a3s-real-tool-line.is-muted > header > i, +.a3s-real-tool-line.is-muted > header > code { + color: rgb(120, 123, 125); } -.a3s-progressive-view strong { - font-size: 8px; - font-weight: 520; +.a3s-real-approval { + display: grid; + min-width: 0; + padding: 2px 0 5px; + color: rgb(220, 220, 220); + gap: 1px; + font-family: var(--a3s-mono); + animation: a3s-real-row-in 160ms ease-out both; } -.a3s-progressive-view.is-ready { - border-color: rgba(139, 157, 255, 0.45); - background: rgba(139, 157, 255, 0.055); - color: #cbd2ff; - animation: a3s-capability-result-in 260ms ease-out; +.a3s-real-approval > header, +.a3s-real-approval-detail, +.a3s-real-approval > footer { + padding-right: 2px; + padding-left: 2px; } -.a3s-runtime-worker { +.a3s-real-approval > header { display: flex; - min-height: 70px; - margin: 14px 0; - padding: 12px 14px; - border: 1px solid #2c3d3a; - border-radius: 6px; - background: rgba(15, 24, 23, 0.76); + min-height: 21px; align-items: center; - justify-content: space-between; -} - -.a3s-runtime-worker > div { - display: flex; - flex-direction: column; - gap: 4px; -} - -.a3s-runtime-worker small { - color: #5b7d76; - font-size: 7px; - letter-spacing: 0.09em; + gap: 6px; } -.a3s-runtime-worker strong { - color: #d9e8e4; +.a3s-real-approval > header > span { + color: rgb(215, 168, 75); font-size: 12px; - font-weight: 590; -} - -.a3s-runtime-worker code { - color: #6d817d; - font-size: 7px; } -.a3s-runtime-worker > i { - width: 9px; - height: 9px; - border: 1px solid #53635f; - border-radius: 50%; +.a3s-real-approval > header > strong { + color: rgb(220, 220, 220); + font-size: 11.5px; + font-weight: 650; } -.a3s-runtime-worker > i.is-ready { - border-color: #55d1b3; - background: #55d1b3; - box-shadow: 0 0 13px rgba(85, 209, 179, 0.52); -} - -.a3s-runtime-batch { +.a3s-real-approval-detail { display: grid; - gap: 8px; + min-width: 0; + min-height: 20px; + margin: 0; + color: rgb(95, 99, 104); + grid-template-columns: 30px minmax(0, 1fr); + align-items: baseline; + gap: 4px; } -.a3s-runtime-batch > div { - display: grid; - min-height: 58px; - padding: 0 12px; - border: 1px solid #29343d; - border-radius: 5px; - background: rgba(13, 18, 23, 0.82); - grid-template-columns: 24px minmax(0, 1fr) minmax(72px, 0.55fr); - align-items: center; - gap: 10px; +.a3s-real-approval-detail > span, +.a3s-real-approval-detail > code { + font-size: 10.5px; + line-height: 1.45; } -.a3s-runtime-batch > div > span { - color: #4f5e6a; - font-size: 7px; +.a3s-real-approval-detail > code { + overflow: hidden; + color: rgb(220, 220, 220); + font-family: inherit; + text-overflow: ellipsis; + white-space: nowrap; } -.a3s-runtime-batch p { - display: flex; +.a3s-real-approval > ol { + display: grid; min-width: 0; margin: 0; - flex-direction: column; - gap: 3px; + padding: 0; + gap: 0; + list-style: none; } -.a3s-runtime-batch strong { - overflow: hidden; - color: #aab6c0; - font-size: 8px; - font-weight: 530; - text-overflow: ellipsis; +.a3s-real-approval > ol > li { + display: grid; + min-width: 0; + min-height: 22px; + padding: 1px 2px; + color: rgb(220, 220, 220); + grid-template-columns: 12px 13px 14px minmax(0, 1fr); + align-items: center; + gap: 4px; } -.a3s-runtime-batch small { - color: #586674; - font-size: 7px; +.a3s-real-approval > ol > li.is-selected { + background: rgb(42, 46, 52); } -.a3s-runtime-batch > div > i { - display: block; - height: 3px; - overflow: hidden; - border-radius: 999px; - background: #28323b; +.a3s-real-approval > ol > li > span, +.a3s-real-approval > ol > li > b, +.a3s-real-approval > ol > li > i, +.a3s-real-approval > ol > li > p { + font-size: 10.5px; + line-height: 1.4; } -.a3s-runtime-batch > div > i b { - display: block; - width: 8%; - height: 100%; - border-radius: inherit; - background: #57646f; - transition: width 420ms ease; +.a3s-real-approval > ol > li > span, +.a3s-real-approval > ol > li > b { + color: rgb(95, 99, 104); + font-weight: 400; } -.a3s-runtime-batch > div.is-running > i b { - width: 68%; - background: #55d1b3; - animation: a3s-capability-runtime-progress 980ms ease-in-out infinite - alternate; +.a3s-real-approval > ol > li > i { + color: rgb(95, 99, 104); + font-style: normal; } -.a3s-runtime-batch > div.is-complete > i b { - width: 100%; - background: #55d1b3; +.a3s-real-approval > ol > li:last-child > i { + color: rgb(224, 108, 117); } -.a3s-runtime-batch > div.is-running small { - color: #72bea9; +.a3s-real-approval > ol > li > p { + overflow: hidden; + margin: 0; + color: rgb(220, 220, 220); + text-overflow: ellipsis; + white-space: nowrap; } -.a3s-runtime-batch > div.is-complete small { - color: #63c49f; +.a3s-real-approval > footer { + min-height: 18px; + padding-top: 2px; + color: rgb(95, 99, 104); + font-size: 9.5px; + line-height: 1.4; } -.a3s-capability-scene--runtime > footer { - display: flex; - min-height: 36px; - margin-top: 12px; - padding: 0 12px; - border-top: 1px solid #28323b; - color: #66737f; +.a3s-real-open-view { + display: grid; + min-width: 0; + min-height: 22px; + margin: 0; + color: rgb(220, 220, 220); + grid-template-columns: 15px 13px auto minmax(0, 1fr); align-items: center; - justify-content: space-between; - gap: 10px; - font-size: 7px; + gap: 5px; + font-family: var(--a3s-mono); + animation: a3s-real-row-in 180ms ease-out both; } -.a3s-capability-scene--runtime > footer span { - color: #55d1b3; +.a3s-real-open-view > i { + color: rgb(125, 182, 255); + font-style: normal; + text-align: center; } -.a3s-capability-scene--runtime > footer p { - margin: 0; +.a3s-real-open-view > span { + color: rgb(125, 182, 255); } -.a3s-capability-scene--runtime > footer.is-ready p { - color: #9dd9c7; +.a3s-real-open-view > strong { + color: rgb(220, 220, 220); + font-size: 11px; + font-weight: 650; } -.a3s-capability-scene--intelligence { - padding: 0; +.a3s-real-open-view > small { + color: rgb(120, 123, 125); + font-size: 10px; } -.a3s-capability-scene--intelligence > header { - background: rgba(14, 19, 25, 0.94); +.a3s-real-runtime-tracker { + padding-top: 4px; + padding-bottom: 2px; + border-top: 0; } -.a3s-capability-scene--intelligence > header > span { - display: inline-flex; - color: #a9b5c0; - align-items: center; - gap: 7px; - font-size: 8px; +.a3s-real-runtime-tracker > div > p.is-done > i { + color: rgb(78, 201, 139); + animation: none; } -.a3s-capability-scene--intelligence > header > span i { - width: 6px; - height: 6px; - border-radius: 2px; - background: #d19956; +.a3s-real-runtime-tracker > div > p.is-done > i::before { + content: '✓'; } -.a3s-intelligence-workbench { - display: grid; - min-height: 324px; - grid-template-columns: minmax(0, 1.25fr) minmax(170px, 0.75fr); +.a3s-real-runtime-tracker > div > p.is-done > i { + font-size: 0; } -.a3s-intelligence-code { - padding: 20px 0; - border-right: 1px solid #29323c; - background: rgba(10, 14, 19, 0.72); +.a3s-real-runtime-tracker > div > p.is-done > i::before { + font-size: 11px; } -.a3s-intelligence-code p { +.a3s-real-ide { display: grid; - min-height: 30px; - margin: 0; - padding: 0 12px 0 0; - color: #aeb9c5; - grid-template-columns: 42px minmax(0, 1fr); - align-items: center; - font-size: 8px; -} - -.a3s-intelligence-code p > span { - padding-right: 11px; - color: #465362; - text-align: right; - user-select: none; + min-width: 0; + height: 100%; + min-height: 0; + grid-template-rows: minmax(0, 1fr) 56px; + gap: 4px; + font-family: var(--a3s-mono); + animation: a3s-real-row-in 160ms ease-out both; } -.a3s-intelligence-code p code { - overflow: hidden; - white-space: nowrap; +.a3s-real-ide-main, +.a3s-real-ide-footer { + display: grid; + min-width: 0; + min-height: 0; + gap: 4px; } -.a3s-intelligence-code p b { - color: #c099ef; - font-weight: 500; +.a3s-real-ide-main { + grid-template-columns: minmax(154px, 0.34fr) minmax(0, 0.66fr); } -.a3s-intelligence-code p mark { - background: transparent; - color: #74b9f4; +.a3s-real-ide-footer { + grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } -.a3s-intelligence-code p.is-symbol { - background: rgba(102, 181, 255, 0.075); - box-shadow: inset 2px 0 #66b5ff; +.a3s-real-ide-frame { + display: grid; + overflow: hidden; + min-width: 0; + min-height: 0; + border: 1px solid rgb(52, 58, 64); + border-radius: 7px; + background: rgb(21, 25, 31); + grid-template-rows: 27px minmax(0, 1fr); } -.a3s-intelligence-workbench > aside { - background: rgba(13, 18, 24, 0.9); +.a3s-real-ide-editor { + border-color: rgba(125, 182, 255, 0.76); } -.a3s-intelligence-command { +.a3s-real-ide-frame > header { display: flex; - min-height: 38px; - padding: 0 12px; - border-bottom: 1px solid #29323c; - color: #66b5ff; + overflow: hidden; + min-width: 0; + padding: 0 10px; + border-bottom: 1px solid rgba(52, 58, 64, 0.72); + color: rgb(220, 220, 220); align-items: center; - gap: 5px; - font-size: 8px; + font-size: 10px; + font-weight: 560; + line-height: 1; + text-overflow: ellipsis; + white-space: nowrap; } -.a3s-intelligence-workbench > aside > strong { - display: block; - padding: 14px 12px 9px; - color: #768493; - font-size: 7px; - font-weight: 520; - letter-spacing: 0.06em; - text-transform: uppercase; +.a3s-real-ide-editor > header { + color: rgb(125, 182, 255); } -.a3s-intelligence-workbench ul { +.a3s-real-ide-tree > div { + overflow: hidden; + padding: 6px 5px; +} + +.a3s-real-ide-tree p { + display: grid; + min-width: 0; + min-height: 25px; margin: 0; padding: 0 7px; - list-style: none; + color: rgb(120, 123, 125); + grid-template-columns: 14px minmax(0, 1fr); + align-items: center; + gap: 5px; + font-size: 10px; } -.a3s-intelligence-workbench li { - display: flex; - min-height: 45px; - padding: 6px 8px; - border-bottom: 1px solid #252e37; - opacity: 0.22; - flex-direction: column; - justify-content: center; - gap: 3px; - transform: translateX(5px); - transition: - opacity 180ms ease, - transform 180ms ease; +.a3s-real-ide-tree p:nth-child(n + 2) { + padding-left: 18px; } -.a3s-intelligence-workbench li.is-visible { - opacity: 1; - transform: translateX(0); +.a3s-real-ide-tree p.is-selected { + background: rgb(42, 46, 52); + color: rgb(220, 220, 220); } -.a3s-intelligence-workbench li b { - color: #66b5ff; - font-size: 7px; - font-weight: 500; +.a3s-real-ide-tree p > span { + color: rgb(110, 198, 217); } -.a3s-intelligence-workbench li span { +.a3s-real-ide-tree p > b { overflow: hidden; - color: #9eabb7; - font-size: 7px; + font-size: inherit; + font-weight: 480; text-overflow: ellipsis; white-space: nowrap; } -.a3s-capability-scene--intelligence > footer { - display: flex; - min-height: 46px; - padding: 0 12px; - border-top: 1px solid #29323c; - background: rgba(9, 13, 18, 0.94); - color: #64717e; - align-items: center; - gap: 13px; - font-size: 7px; +.a3s-real-ide-code { + overflow: hidden; + min-height: 0; + padding: 7px 0; } -.a3s-capability-scene--intelligence > footer > span { - display: inline-flex; +.a3s-real-ide-code > p { + display: grid; + min-width: 0; + min-height: 27px; + margin: 0; + padding-right: 8px; + color: rgb(220, 220, 220); + grid-template-columns: 44px minmax(0, 1fr); align-items: center; - gap: 5px; -} - -.a3s-capability-scene--intelligence > footer i.is-ready, -.a3s-capability-scene--intelligence > footer span.is-ready i { - background: #55c892; - box-shadow: 0 0 8px rgba(85, 200, 146, 0.5); } -.a3s-capability-scene--intelligence > footer span.is-ready { - color: #7cc9a6; +.a3s-real-ide-code > p.is-current { + background: rgb(42, 46, 52); } -.a3s-capability-scene--intelligence > footer code { - overflow: hidden; - margin-left: auto; - color: #526578; - text-overflow: ellipsis; - white-space: nowrap; -} - -.a3s-ctx-command { - grid-template-columns: auto minmax(0, 1fr); +.a3s-real-ide-code > p > span { + padding-right: 10px; + color: rgb(95, 99, 104); + font-size: 9.5px; + text-align: right; } -.a3s-ctx-command > span { - color: #c18cff; +.a3s-real-ide-code > p.is-current > span { + color: rgb(125, 182, 255); } -.a3s-ctx-results { - margin-top: 13px; +.a3s-real-ide-code > p > code { overflow: hidden; - border: 1px solid #2c3541; - border-radius: 6px; - background: rgba(11, 15, 20, 0.9); -} - -.a3s-ctx-results > header > span { - color: #a780d3; - font-size: 8px; + color: inherit; + font-family: inherit; + font-size: 10px; + text-overflow: ellipsis; + white-space: pre; } -.a3s-ctx-results > div { - display: grid; - min-height: 52px; - padding: 7px 12px; - border-bottom: 1px solid #252e38; - color: #71808f; - grid-template-columns: 20px 56px minmax(70px, auto) minmax(0, 1fr); - align-items: center; - gap: 6px; - font-size: 7px; - transition: - background 180ms ease, - color 180ms ease; +.a3s-real-ide-results { + overflow: hidden; + min-height: 0; + padding: 7px 5px; } -.a3s-ctx-results > div:last-child { - border-bottom: 0; +.a3s-real-ide-results > p { + min-height: 25px; + margin: 0; + padding: 5px 7px; + color: rgb(220, 220, 220); + font-size: 10px; + line-height: 1.45; + overflow-wrap: anywhere; } -.a3s-ctx-results > div.is-selected { - background: rgba(193, 140, 255, 0.08); - color: #dbc2f7; - box-shadow: inset 2px 0 #c18cff; +.a3s-real-ide-results > p.is-selected { + background: rgb(42, 46, 52); } -.a3s-ctx-results > div b { - color: #52606e; - font-weight: 500; +.a3s-real-ide-results.is-loading > p { + color: rgb(120, 123, 125); } -.a3s-ctx-results > div span { - color: inherit; +.a3s-real-ide-footer .a3s-real-ide-frame { + grid-template-rows: 22px minmax(0, 1fr); } -.a3s-ctx-results > div small { - color: #596675; - font-size: 7px; +.a3s-real-ide-footer .a3s-real-ide-frame > header { + padding-right: 8px; + padding-left: 8px; + color: rgb(95, 99, 104); + font-size: 8.5px; + text-transform: lowercase; } -.a3s-ctx-results > div p { +.a3s-real-ide-footer .a3s-real-ide-frame > p { overflow: hidden; + min-width: 0; margin: 0; - color: inherit; + padding: 7px 8px 0; + color: rgb(120, 123, 125); + font-size: 8.5px; + line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; } -.a3s-ctx-actions { - display: grid; - margin-top: 11px; - gap: 8px; - grid-template-columns: repeat(2, minmax(0, 1fr)); +.a3s-real-ctx { + gap: 15px; } -.a3s-ctx-actions > div { +.a3s-real-ctx-results { display: grid; - min-height: 62px; - padding: 9px 10px; - border: 1px solid #2b3540; - border-radius: 5px; - color: #5f6c79; - grid-template-columns: minmax(0, 1fr) auto; - align-content: center; - gap: 4px 8px; + min-width: 0; + color: rgb(220, 220, 220); + gap: 3px; + font-family: var(--a3s-mono); + animation: a3s-real-row-in 180ms ease-out both; } -.a3s-ctx-actions code { - color: #80718f; - font-size: 8px; +.a3s-real-ctx-results > div { + display: grid; + min-width: 0; + gap: 1px; } -.a3s-ctx-actions span { - color: #596674; +.a3s-real-ctx-results > div > p { + display: grid; + min-width: 0; + min-height: 18px; + margin: 0; + color: inherit; + grid-template-columns: 28px minmax(0, 1fr); + align-items: baseline; + gap: 5px; } -.a3s-ctx-actions p { - margin: 0; - grid-column: 1 / -1; - font-size: 7px; +.a3s-real-ctx-results > div > p > b { + color: rgb(110, 198, 217); + font-size: 10.5px; + text-align: right; } -.a3s-ctx-actions > div.is-ready { - border-color: rgba(193, 140, 255, 0.42); - background: rgba(193, 140, 255, 0.055); - color: #c9adde; - animation: a3s-capability-result-in 220ms ease-out; +.a3s-real-ctx-results > div > p > strong { + overflow: hidden; + color: rgb(220, 220, 220); + font-size: 10.5px; + font-weight: 650; + text-overflow: ellipsis; + white-space: nowrap; } -.a3s-ctx-actions > div.is-ready code, -.a3s-ctx-actions > div.is-ready span { - color: #c18cff; +.a3s-real-ctx-results > div > small { + overflow: hidden; + min-width: 0; + padding-left: 33px; + color: rgb(120, 123, 125); + font-size: 9.5px; + line-height: 1.45; + text-overflow: ellipsis; + white-space: nowrap; } -.a3s-capability-scene--ctx > footer { - display: flex; - margin-top: 11px; - color: #5f516f; - flex-wrap: wrap; - gap: 6px; +.a3s-real-ctx-results > footer { + overflow: hidden; + min-width: 0; + padding-top: 3px; + padding-left: 33px; + color: rgb(120, 123, 125); + font-size: 9.5px; + line-height: 1.45; + text-overflow: ellipsis; + white-space: nowrap; } -.a3s-capability-scene--ctx > footer span { - padding: 4px 6px; - border: 1px solid #332d3b; - border-radius: 3px; - background: rgba(16, 12, 20, 0.72); - font-size: 6px; +.a3s-real-notice { + display: grid; + min-width: 0; + min-height: 20px; + margin: 0; + color: rgb(120, 123, 125); + grid-template-columns: 18px minmax(0, 1fr); + align-items: baseline; + gap: 3px; + font-family: var(--a3s-mono); + font-size: 10.5px; + line-height: 1.45; + animation: a3s-real-row-in 180ms ease-out both; } -@keyframes a3s-capability-story-in { - from { - opacity: 0; - transform: translateY(5px); - } +.a3s-real-notice > i { + font-style: normal; + text-align: right; +} - to { - opacity: 1; - transform: translateY(0); - } +.a3s-real-notice.is-success, +.a3s-real-notice.is-success > i { + color: rgb(78, 201, 139); } -@keyframes a3s-capability-result-in { +@keyframes a3s-real-row-in { from { - opacity: 0.3; + opacity: 0; transform: translateY(3px); } @@ -632,9 +611,9 @@ } } -@keyframes a3s-capability-pulse { +@keyframes a3s-real-pulse { from { - opacity: 0.55; + opacity: 0.42; } to { @@ -642,16 +621,15 @@ } } -@keyframes a3s-capability-runtime-progress { - from { - opacity: 0.55; - transform: scaleX(0.74); - transform-origin: left; - } - - to { - opacity: 1; - transform: scaleX(1); - transform-origin: left; +@media (prefers-reduced-motion: reduce) { + .a3s-real-user-message, + .a3s-real-tool-line, + .a3s-real-approval, + .a3s-real-open-view, + .a3s-real-ide, + .a3s-real-ctx-results, + .a3s-real-notice, + .a3s-real-tool-line.is-active > header > i { + animation: none; } } diff --git a/website/theme/capability-showcase.css b/website/theme/capability-showcase.css index c40567b..526159a 100644 --- a/website/theme/capability-showcase.css +++ b/website/theme/capability-showcase.css @@ -31,65 +31,64 @@ } .a3s-capability-console { - --capability-accent: #e5b769; - --capability-accent-rgb: 229, 183, 105; + --capability-accent: #d7a84b; + --capability-accent-rgb: 215, 168, 75; + --capability-progress: 1; position: relative; display: grid; min-height: 0; background: transparent; gap: 18px; - grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.8fr); - transition: --capability-accent 240ms ease; + grid-template-columns: minmax(250px, 0.7fr) minmax(0, 1.8fr); } .a3s-capability-console::before { position: absolute; z-index: 0; - width: 520px; - height: 520px; + top: -190px; + right: -160px; + width: 500px; + height: 500px; border-radius: 50%; background: radial-gradient( circle, - rgba(var(--capability-accent-rgb), 0.1), + rgba(var(--capability-accent-rgb), 0.09), transparent 68% ); content: ''; - filter: blur(12px); + filter: blur(16px); pointer-events: none; - right: -170px; - top: -210px; } .a3s-capability-console.is-progressive { - --capability-accent: #8b9dff; - --capability-accent-rgb: 139, 157, 255; + --capability-accent: #7db6ff; + --capability-accent-rgb: 125, 182, 255; } .a3s-capability-console.is-runtime { - --capability-accent: #55d1b3; - --capability-accent-rgb: 85, 209, 179; + --capability-accent: #4ec98b; + --capability-accent-rgb: 78, 201, 139; } .a3s-capability-console.is-intelligence { - --capability-accent: #66b5ff; - --capability-accent-rgb: 102, 181, 255; + --capability-accent: #6ec6d9; + --capability-accent-rgb: 110, 198, 217; } .a3s-capability-console.is-ctx { - --capability-accent: #c18cff; - --capability-accent-rgb: 193, 140, 255; + --capability-accent: #b69bf1; + --capability-accent-rgb: 182, 155, 241; } -.a3s-capability-console[data-stage='0'] { - --capability-progress: 1; -} .a3s-capability-console[data-stage='1'] { --capability-progress: 2; } + .a3s-capability-console[data-stage='2'] { --capability-progress: 3; } + .a3s-capability-console[data-stage='3'] { --capability-progress: 4; } @@ -101,7 +100,7 @@ overflow: hidden; border: 1px solid #29313c; border-radius: 8px; - background: rgba(10, 13, 18, 0.82); + background: rgba(10, 13, 18, 0.84); flex-direction: column; box-shadow: 0 28px 72px rgba(0, 0, 0, 0.28), @@ -151,6 +150,11 @@ color: #aab5c1; } +.a3s-capability-selector > button:focus-visible { + outline: 1px solid rgba(var(--capability-accent-rgb), 0.72); + outline-offset: -3px; +} + .a3s-capability-selector > button.is-active { background: linear-gradient( @@ -192,7 +196,7 @@ width: 17px; height: 17px; fill: none; - stroke: currentColor; + stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; @@ -242,10 +246,11 @@ height: 100%; background: var(--capability-accent); box-shadow: 0 0 8px rgba(var(--capability-accent-rgb), 0.7); + transition: width 220ms ease; } .a3s-capability-selector > button.is-active > em b { - width: calc((var(--capability-progress, 1) / 4) * 100%); + width: calc((var(--capability-progress) / 4) * 100%); } .a3s-capability-player.a3s-runtime-inspector { @@ -254,12 +259,14 @@ width: 100%; min-width: 0; min-height: 720px; + overflow: hidden; border-color: #343a40; - background: #15191f; + background: rgb(21, 25, 31); } .a3s-capability-player > .a3s-tui-terminal { - padding: 18px 20px 10px; + overflow: hidden; + padding: 20px 20px 12px; flex: 1 1 auto; } @@ -267,284 +274,18 @@ flex: 0 0 auto; } -.a3s-capability-player-intro { - display: grid; - min-width: 0; - padding: 0 0 12px; - border-bottom: 1px solid #292f36; - grid-template-columns: minmax(0, 1fr) auto; - align-items: start; - gap: 18px; -} - -.a3s-capability-player-intro > div { - max-width: 680px; -} - -.a3s-capability-player-intro > div > span { - color: var(--capability-accent); - font-family: var(--a3s-mono); - font-size: 9px; - letter-spacing: 0.12em; -} - -.a3s-capability-player-intro h3 { - margin: 5px 0 6px; - color: #edf2f7; - font-family: var(--a3s-mono); - font-size: clamp(16px, 1.8vw, 20px); - font-weight: 580; - letter-spacing: -0.015em; - line-height: 1.3; -} - -.a3s-capability-player-intro p { - max-width: 650px; - margin: 0; - color: #8c97a4; - font-size: 10px; - line-height: 1.55; -} - -.a3s-capability-player-intro > small { - display: inline-flex; - flex: 0 0 auto; - padding: 5px 7px; - border: 1px solid #2e3944; - border-radius: 999px; - background: rgba(10, 15, 20, 0.76); - color: #788694; - align-items: center; - gap: 6px; - font-family: var(--a3s-mono); - font-size: 7.5px; - white-space: nowrap; -} - -.a3s-capability-player-intro > small i { - width: 5px; - height: 5px; - border-radius: 50%; - background: var(--capability-accent); - box-shadow: 0 0 9px rgba(var(--capability-accent-rgb), 0.62); -} - -.a3s-capability-player-stage { - min-height: 350px; - margin-top: 10px; - padding: 10px 0 0; - flex: 1 1 auto; - animation: a3s-capability-story-in 240ms ease-out; -} - -.a3s-capability-tui-plan { - padding-bottom: 7px; -} - -.a3s-capability-tui-plan li.is-active > i { - color: var(--capability-accent); -} - -.a3s-capability-tui-plan li.is-done > i { - color: #4ec98b; -} - -.a3s-capability-scene-wrap { - position: relative; - display: flex; - min-width: 0; - flex: 1 1 auto; -} - -.a3s-capability-scene-wrap::after { - display: none; -} - -.a3s-capability-scene { - width: 100%; - min-height: 100%; - padding: 2px 0; - color: #9da9b5; - font-family: var(--a3s-mono); -} - -.a3s-capability-tui-meta { - margin-top: 8px; -} - -.a3s-capability-tui-meta > span:first-child { - color: var(--capability-accent); -} - -.a3s-capability-tui-tag { - display: inline-flex; - align-items: center; - gap: 6px; -} - -.a3s-capability-call, -.a3s-runtime-tool-call, -.a3s-ctx-command { - display: grid; - min-width: 0; - padding: 10px 12px; - border: 1px solid #2d3742; - border-radius: 5px; - background: rgba(15, 20, 27, 0.9); - grid-template-columns: auto minmax(0, 1fr) auto; - align-items: center; - gap: 10px; -} - -.a3s-capability-call > span, -.a3s-runtime-tool-call > span { - padding: 3px 6px; - border-radius: 3px; - background: rgba(var(--capability-accent-rgb), 0.1); - color: var(--capability-accent); - font-size: 8px; -} - -.a3s-capability-call code, -.a3s-runtime-tool-call code, -.a3s-ctx-command code { - overflow: hidden; - color: #d3dbe4; - font-size: 9px; - text-overflow: ellipsis; - white-space: nowrap; -} - -.a3s-capability-call em { - color: #637080; - font-size: 7px; - font-style: normal; -} - -.a3s-capability-call em.is-warning { - color: #e0b367; -} - -.a3s-capability-approval { - max-width: 470px; - margin: 18px auto 0; - overflow: hidden; - border: 1px solid #3a342b; - border-radius: 7px; - background: rgba(15, 17, 20, 0.96); - box-shadow: 0 20px 44px rgba(0, 0, 0, 0.38); - opacity: 0.18; - transform: translateY(8px) scale(0.985); - transition: - opacity 220ms ease, - transform 220ms ease; -} - -.a3s-capability-approval.is-visible { - opacity: 1; - transform: translateY(0) scale(1); -} - -.a3s-capability-approval > header, -.a3s-ctx-results > header, -.a3s-capability-scene--intelligence > header { - display: flex; - min-height: 36px; - padding: 0 12px; - border-bottom: 1px solid #2c333b; - align-items: center; - justify-content: space-between; - gap: 12px; -} - -.a3s-capability-approval > header > span { - color: #e0b367; - font-size: 8px; - letter-spacing: 0.08em; -} - -.a3s-capability-approval > header > small, -.a3s-ctx-results > header > small, -.a3s-capability-scene--intelligence > header > small { - color: #616c79; - font-size: 7px; -} - -.a3s-capability-approval > p { - display: grid; - margin: 0; - padding: 11px 13px; - border-bottom: 1px solid #282f37; - grid-template-columns: 38px minmax(0, 1fr); - gap: 8px; -} - -.a3s-capability-approval > p small { - color: #65717f; - font-size: 8px; -} - -.a3s-capability-approval > p code { - color: #d8dfe7; - font-size: 8px; -} - -.a3s-capability-approval ol { - margin: 0; +.a3s-capability-player.is-fullscreen > .a3s-tui-terminal { padding: 8px; - list-style: none; -} - -.a3s-capability-approval li { - display: grid; - min-height: 30px; - padding: 0 8px; - border-radius: 3px; - color: #939eaa; - grid-template-columns: 22px minmax(0, 1fr); - align-items: center; - font-size: 8px; } -.a3s-capability-approval li.is-selected { - background: rgba(229, 183, 105, 0.1); - color: #f0e2c8; -} - -.a3s-capability-approval li b { - color: #5f6b78; - font-weight: 500; -} - -.a3s-capability-approval li.is-selected b { - color: #e5b769; -} - -.a3s-capability-approval > footer { - display: flex; - min-height: 34px; - padding: 0 12px; - border-top: 1px solid #2c333b; - background: #0c1014; - color: #717d89; - align-items: center; - gap: 7px; - font-size: 7px; -} - -.a3s-capability-approval > footer i, -.a3s-capability-scene--intelligence > footer i { - width: 5px; - height: 5px; - border-radius: 50%; - background: #7b8793; -} - -.a3s-capability-approval > footer.is-resolved { - color: #78c49f; +.a3s-tui-composer.is-hidden { + display: none; } -.a3s-capability-approval > footer.is-resolved i { - background: #56c58b; - box-shadow: 0 0 8px rgba(86, 197, 139, 0.55); +@media (prefers-reduced-motion: reduce) { + .a3s-capability-selector > button, + .a3s-capability-selector > button::after, + .a3s-capability-selector > button > em b { + transition: none; + } } diff --git a/website/theme/components/A3sCodeTui.tsx b/website/theme/components/A3sCodeTui.tsx index 8fa6538..a91030d 100644 --- a/website/theme/components/A3sCodeTui.tsx +++ b/website/theme/components/A3sCodeTui.tsx @@ -10,6 +10,7 @@ type A3sCodeTuiProps = { branch?: string; children: ReactNode; className?: string; + composerHidden?: boolean; composerMode?: A3sCodeTuiInputMode; composerStatus: string; composerSymbol?: string; @@ -17,6 +18,7 @@ type A3sCodeTuiProps = { contextLabel: string; identity?: string; isPlaying: boolean; + modeGlyph?: string; modeLabel: string; model?: string; onPlayback: () => void; @@ -41,6 +43,7 @@ export const A3sCodeTui = forwardRef( branch = 'git:(main)', children, className, + composerHidden = false, composerMode = 'default', composerStatus, composerSymbol = '❯', @@ -48,6 +51,7 @@ export const A3sCodeTui = forwardRef( contextLabel, identity = 'a3s', isPlaying, + modeGlyph = '●', modeLabel, model = 'gpt-5 (128k context)', onPlayback, @@ -66,8 +70,10 @@ export const A3sCodeTui = forwardRef( 'a3s-runtime-inspector', 'a3s-tui-player', isPlaying && 'is-running', + composerHidden && 'is-fullscreen', className, )} + data-composer-hidden={composerHidden || undefined} data-a3s-code-tui={surface} data-phase={phase} ref={ref} @@ -98,7 +104,11 @@ export const A3sCodeTui = forwardRef(
@@ -119,7 +129,7 @@ export const A3sCodeTui = forwardRef(
- + {modeLabel} diff --git a/website/theme/components/CapabilityIdeScene.tsx b/website/theme/components/CapabilityIdeScene.tsx new file mode 100644 index 0000000..c15ad15 --- /dev/null +++ b/website/theme/components/CapabilityIdeScene.tsx @@ -0,0 +1,119 @@ +import { TuiWelcomeBanner } from './TuiWelcomeBanner'; + +const codeRows = [ + ['52', 'pub(crate) struct RuntimeTool {'], + ['53', ' session: OsSession,'], + ['54', ' client: Client,'], + ['55', '}'], + ['…', ''], + ['117', 'impl Tool for RuntimeTool {'], + ['118', ' fn name(&self) -> &str {'], + ['119', ' "runtime"'], + ['120', ' }'], +]; + +function IdeTree() { + return ( +
+
▾ a3s
+
+

+ + src +

+

+ + runtime_tool.rs +

+

+ + session_llm.rs +

+

+ + tui +

+

+ + main.rs +

+

+ + Cargo.toml +

+
+
+ ); +} + +function IdeEditor({ stage }: { stage: number }) { + const title = + stage === 1 + ? '◇ src › runtime_tool.rs' + : stage === 2 + ? '⌁ References · src/runtime_tool.rs' + : '⌁ References · src/runtime_tool.rs · rev 42'; + + return ( +
+
{title}
+ {stage === 1 ? ( +
+ {codeRows.map(([line, code]) => ( +

+ {line} + {code} +

+ ))} +
+ ) : stage === 2 ? ( +
+

› Loading Code Intelligence…

+
+ ) : ( +
+

› src/runtime_tool.rs:117:15

+

src/runtime_tool.rs:188:6

+

src/tui/app/view.rs:413:22

+

src/runtime_tool/tests.rs:42:16

+
+ )} +
+ ); +} + +export function CapabilityIdeScene({ stage }: { stage: number }) { + if (stage === 0) { + return ( +
+ +
+ ); + } + + return ( +
+
+ + +
+
+
+
details
+

◇ src › runtime_tool.rs · 428 lines · Rust

+
+
+
controls
+

+ {stage === 1 + ? ':references' + : 'Saved version · ↑↓ select · Enter jump · Esc close'} +

+
+
+
+ ); +} diff --git a/website/theme/components/CapabilityShowcase.tsx b/website/theme/components/CapabilityShowcase.tsx index 1522057..a871e4a 100644 --- a/website/theme/components/CapabilityShowcase.tsx +++ b/website/theme/components/CapabilityShowcase.tsx @@ -1,209 +1,12 @@ import { useEffect, useRef, useState } from 'react'; -import { A3sCodeTui } from './A3sCodeTui'; - -type Locale = 'zh' | 'en'; - -type Localized = { - zh: string; - en: string; -}; - -type CapabilityKey = - 'hitl' | 'progressive' | 'runtime' | 'intelligence' | 'ctx'; - -type CapabilityStory = { - key: CapabilityKey; - index: string; - eyebrow: string; - title: Localized; - body: Localized; - prompt: Localized; - availability: Localized; - tags: string[]; - stages: Localized[]; -}; - -const sectionCopy = { - zh: { - eyebrow: 'A3S CODE / DISTINCTIVE CAPABILITIES', - title: '五个关键瞬间,看懂一次任务如何安全地变聪明', - body: '从执行前确认到代码语义,从按需发现平台能力到找回过去会话:选择一个场景,查看真实的交互顺序与边界。', - guide: '查看完整 TUI 指南', - select: '选择能力演示', - live: 'LIVE CAPABILITY', - play: '播放', - pause: '暂停', - replay: '重播', - step: '阶段', - working: '正在执行能力流程', - mode: 'Default', - context: 'ctx:12%', - workspace: '~/workspace/a3s', - }, - en: { - eyebrow: 'A3S CODE / DISTINCTIVE CAPABILITIES', - title: 'Five decisive moments that make a coding run safer and smarter', - body: 'From approval before execution to code semantics, on-demand platform discovery, and past-session recall: select a capability to see its real interaction order and boundaries.', - guide: 'Read the complete TUI guide', - select: 'Select a capability demo', - live: 'LIVE CAPABILITY', - play: 'Play', - pause: 'Pause', - replay: 'Replay', - step: 'Stage', - working: 'Running capability flow', - mode: 'Default', - context: 'ctx:12%', - workspace: '~/workspace/a3s', - }, -}; - -export const capabilityStories: CapabilityStory[] = [ - { - key: 'hitl', - index: '01', - eyebrow: 'HITL', - title: { - zh: '越过执行边界前,由你决定', - en: 'You decide before a call crosses the boundary', - }, - body: { - zh: '需要确认的调用会在执行前暂停,并展示规范化参数。你可以只允许一次、保留精确的会话或项目授权,或者拒绝并说明原因。', - en: 'Calls that need confirmation pause before execution and expose canonical arguments. Allow once, retain an exact session or project grant, or deny with a reason.', - }, - prompt: { - zh: '测试通过后,将 main 分支推送到 origin', - en: 'Push main to origin after the tests pass', - }, - availability: { - zh: 'Default 模式 · 风险感知', - en: 'Default mode · risk-aware', - }, - tags: ['canonical args', 'exact grants', 'fail closed'], - stages: [ - { zh: '识别边界', en: 'Classify boundary' }, - { zh: '暂停并展示', en: 'Pause and explain' }, - { zh: '选择授权范围', en: 'Choose grant scope' }, - { zh: '记录决定', en: 'Record the decision' }, - ], - }, - { - key: 'progressive', - index: '02', - eyebrow: 'PROGRESSIVE API', - title: { - zh: '先发现,再只加载需要的 Schema', - en: 'Discover first, then load only the schema you need', - }, - body: { - zh: '登录 A3S OS 后,通过一个按权限过滤的入口执行 list → search → describe → execute。模型无需把整个平台手册塞进上下文。', - en: 'After A3S OS login, one permission-filtered endpoint runs list → search → describe → execute. The model never needs the whole platform manual in context.', - }, - prompt: { - zh: '部署发布知识包,并打开运行视图', - en: 'Deploy the release knowledge package and open its run view', - }, - availability: { - zh: '登录后可用 · 权限过滤', - en: 'Available after login · permission-filtered', - }, - tags: ['list', 'search', 'describe', 'execute'], - stages: [ - { zh: '列出模块', en: 'List modules' }, - { zh: '搜索操作', en: 'Search operations' }, - { zh: '读取单个 Schema', en: 'Describe one schema' }, - { zh: '执行并返回视图', en: 'Execute with a view' }, - ], - }, - { - key: 'runtime', - index: '03', - eyebrow: 'RUNTIME TOOL', - title: { - zh: '把独立输入交给远程 Worker 并行处理', - en: 'Send independent inputs to a remote worker in parallel', - }, - body: { - zh: '登录后注册的 runtime 工具按 UUID 或名称解析 tool-kind Worker,提交 Function as a Service 批任务,流式呈现进度并聚合结果。', - en: 'The login-gated runtime tool resolves a tool-kind worker by UUID or name, submits a Function-as-a-Service batch, streams progress, and aggregates results.', - }, - prompt: { - zh: '并行检查 core、Node 和 Python 发布包', - en: 'Check the core, Node, and Python releases in parallel', - }, - availability: { - zh: '登录后注册 · 批量执行', - en: 'Registered after login · batch execution', - }, - tags: ['worker resolve', 'batch', 'streaming'], - stages: [ - { zh: '解析 Worker', en: 'Resolve worker' }, - { zh: '提交三个输入', en: 'Submit three inputs' }, - { zh: '流式追踪进度', en: 'Stream progress' }, - { zh: '聚合结果', en: 'Aggregate results' }, - ], - }, - { - key: 'intelligence', - index: '04', - eyebrow: 'CODE INTELLIGENCE', - title: { - zh: 'Agent、TUI 与 Web 共享同一份代码语义', - en: 'Agent, TUI, and Web share one semantic code runtime', - }, - body: { - zh: '基于已保存文件提供符号、定义、声明、引用、实现与诊断。Agent 工具、/ide 和 Monaco 使用同一运行时,脏缓冲区不会伪装成已发布语义。', - en: 'Saved files provide symbols, definitions, declarations, references, implementations, and diagnostics. Agent tools, /ide, and Monaco share the runtime; dirty buffers never masquerade as published semantics.', - }, - prompt: { - zh: '查找 RuntimeTool 的引用并汇总诊断', - en: 'Find RuntimeTool references and collect diagnostics', - }, - availability: { - zh: 'Rust · TypeScript / JavaScript', - en: 'Rust · TypeScript / JavaScript', - }, - tags: ['saved files', 'navigation', 'diagnostics'], - stages: [ - { zh: '启动语言服务', en: 'Start language service' }, - { zh: '定位符号', en: 'Resolve symbol' }, - { zh: '查找引用', en: 'Find references' }, - { zh: '合并诊断', en: 'Collect diagnostics' }, - ], - }, - { - key: 'ctx', - index: '05', - eyebrow: 'CTX RECALL', - title: { - zh: '从过去会话找回决定,而不是重新猜测', - en: 'Recover decisions from past sessions instead of guessing again', - }, - body: { - zh: '本地 ctx 可用时,/ctx 会搜索跨工具、跨会话的索引。命中窗口可以一次性附加到下一条消息,也可以携带来源保存为长期记忆。', - en: 'When the local ctx index is available, /ctx searches across tools and sessions. A hit can be attached once to the next turn or saved to long-term memory with provenance.', - }, - prompt: { - zh: '/ctx RemoteUI view link', - en: '/ctx RemoteUI view link', - }, - availability: { - zh: '本地索引 · 跨会话 · 可追溯', - en: 'Local index · cross-session · traceable', - }, - tags: ['one-shot attach', 'source=ctx', 'memory backlink'], - stages: [ - { zh: '搜索历史', en: 'Search history' }, - { zh: '选择命中', en: 'Select a hit' }, - { zh: '一次性附加', en: 'Attach once' }, - { zh: '保存并保留来源', en: 'Save with provenance' }, - ], - }, -]; - -function value(localized: Localized, locale: Locale) { - return localized[locale]; -} +import { CapabilityTuiDemo } from './CapabilityTuiDemo'; +import { + capabilityStories, + localized, + sectionCopy, + type CapabilityKey, + type Locale, +} from './capability-stories'; function CapabilityIcon({ story }: { story: CapabilityKey }) { const paths: Record = { @@ -249,402 +52,6 @@ function CapabilityIcon({ story }: { story: CapabilityKey }) { ); } -function StageRail({ - locale, - stage, - story, -}: { - locale: Locale; - stage: number; - story: CapabilityStory; -}) { - return ( -
-
    - {story.stages.map((item, index) => { - const status = - index < stage ? 'done' : index === stage ? 'active' : 'pending'; - const glyph = - status === 'done' ? '✔' : status === 'active' ? '◼' : '◻'; - - return ( -
  1. - - -

    {value(item, locale)}

    -
  2. - ); - })} -
-
- ); -} - -function HitlScene({ locale, stage }: { locale: Locale; stage: number }) { - const options = - locale === 'zh' - ? [ - '仅允许一次', - '本会话允许精确能力', - '向项目加入精确规则', - '拒绝并说明原因', - ] - : [ - 'Allow once', - 'Allow exact capability for this session', - 'Add exact capability rule to project', - 'Deny and tell the agent why', - ]; - - return ( -
-
- bash - git push origin main - 0 ? 'is-warning' : ''}> - {stage === 0 ? 'classifying…' : 'external side effect · ASK'} - -
-
0 ? 'is-visible' : ''}`} - > -
- HUMAN APPROVAL REQUIRED - canonical arguments -
-

- Run - git push origin main -

-
    - {options.map((option, index) => ( -
  1. = 2 && index === 0 ? 'is-selected' : ''} - key={option} - > - {index + 1} - {option} -
  2. - ))} -
-
= 3 ? 'is-resolved' : ''}> -