• feat(self-modification): add dynamic Cordis plugin runtime and UI

This commit is contained in:
imccyu
2026-08-12 23:51:31 +08:00
parent 0367506471
commit 4064198560
147 changed files with 20904 additions and 2412 deletions

View File

@@ -227,39 +227,34 @@
padding-left: 0;
}
/* Footer seats: Settings fills the left side and additive actions sit on the
right. Each occupant owns its button geometry and hover chrome. */
/* Footer seats: additive actions stack above Settings. Each occupant owns its
button geometry and hover chrome. */
.footArea {
flex: none;
display: flex;
align-items: flex-end;
gap: 8px;
flex-direction: column;
}
.settingsArea {
flex: 1;
.settingsArea,
.footerActions {
flex: none;
min-width: 0;
width: 100%;
}
.footerActions {
flex: none;
display: flex;
align-items: flex-end;
}
/* The 56px rail cannot hold two controls side by side. Keep both reachable in
the same footer, stacked in their original order. */
.collapsed .footArea {
flex-direction: column;
align-items: center;
gap: 0;
}
.collapsed .settingsArea,
.collapsed .footerActions {
flex: none;
display: flex;
justify-content: center;
width: auto;
}
@media (prefers-reduced-motion: reduce) {

View File

@@ -177,14 +177,14 @@ export function SidebarRoot({
})}
</div>
{/* Footer: Settings stays on the left; optional actions sit beside it. */}
{/* Footer actions stack above Settings in both sidebar widths. */}
<div className={css.footArea}>
<div className={css.settingsArea}>
{renderSlot('sidebar.settings', { wide })}
</div>
<div className={css.footerActions}>
{renderSlot('sidebar.footer.action', { wide })}
</div>
<div className={css.settingsArea}>
{renderSlot('sidebar.settings', { wide })}
</div>
</div>
</div>
)

View File

@@ -4,7 +4,8 @@
* owns column geometry (fold state machine, brand row, New Session);
* everything between the section header and the list bottom is the
* `sidebar.workspaces` registrant's (ui-workspace), and the foot is the
* `sidebar.settings` registrant's (ui-settings).
* `sidebar.settings` registrant's (ui-settings), followed by optional footer
* actions in `sidebar.footer.action`.
*/
import type { PropsLocale, PropsRenderSlots, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'
// Type-only: pulls ui-layout's SlotMap merge (the 'sidebar' entry) into every
@@ -27,6 +28,11 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
* The sidebar passes only its column state — it holds no settings state.
*/
'sidebar.settings': { kind: 'single'; scope: 'root'; owner: SidebarSettingsOwnerProps }
/**
* Optional actions beside Settings at the sidebar foot. Declared by this
* package's 'sidebar' entry; each action receives only the column state.
*/
'sidebar.footer.action': { kind: 'list'; scope: 'root'; owner: SidebarFooterActionOwnerProps }
}
}