refactor(tui): standardize builtin plugin ids

This commit is contained in:
Dax Raad
2026-08-18 09:54:50 -04:00
parent 47af7462ea
commit c3a6721de2
7 changed files with 10 additions and 10 deletions
@@ -99,7 +99,7 @@ function View(props: { context: Plugin.Context }) {
}
export default Plugin.define({
id: "opencode.home-footer",
id: "opencode.home.footer",
setup(context) {
// Root takeover: an external plugin replacing home.footer wins (last-
// enabled) and this builtin shows as suppressed, not silently gone.
@@ -83,7 +83,7 @@ export function PromptFooter(props: { context: Plugin.Context; sessionID?: strin
}
export default Plugin.define({
id: "opencode.prompt-footer",
id: "opencode.prompt.footer",
setup(context) {
context.ui.slot({
append: "prompt.footer",
@@ -42,7 +42,7 @@ export function SidebarContext(props: { context: Plugin.Context; sessionID: stri
}
export default Plugin.define({
id: "internal:sidebar-context",
id: "opencode.sidebar.context",
setup(context) {
context.ui.slot({
append: "sidebar.content",
@@ -40,7 +40,7 @@ function View(props: { context: Plugin.Context; sessionID: string }) {
}
export default Plugin.define({
id: "opencode.sidebar-footer",
id: "opencode.sidebar.footer",
setup(context) {
// Append keeps the path open to additive plugin claims; an external
// replace still takes the boundary over.
@@ -71,7 +71,7 @@ function View(props: { context: Plugin.Context; sessionID: string }) {
}
export default Plugin.define({
id: "internal:sidebar-mcp",
id: "opencode.sidebar.mcp",
setup(context) {
context.ui.slot({
append: "sidebar.content",
@@ -1079,7 +1079,7 @@ function Commands(props: { context: Plugin.Context }) {
}
export default Plugin.define({
id: "diff-viewer",
id: "opencode.diffs",
setup(context) {
context.ui.router.register({
name: ROUTE,
@@ -29,7 +29,7 @@ test("closing the diff viewer returns to the route it opened from", async () =>
try {
expect(viewer.current()).toEqual({
type: "plugin",
id: "diff-viewer",
id: "opencode.diffs",
name: "diff",
data: { mode: "working", sessionID: "session-1", returnRoute: startRoute },
})
@@ -207,7 +207,7 @@ async function renderDiffViewer(
navigate(destination: Destination) {
setCurrent(
destination.type === "plugin" && !("id" in destination)
? { ...destination, id: "diff-viewer" }
? { ...destination, id: "opencode.diffs" }
: destination,
)
},
@@ -334,7 +334,7 @@ test("branch diff source requests branch VCS diff", async () => {
const viewer = await renderDiffViewer([], {
initialRoute: {
type: "plugin",
id: "diff-viewer",
id: "opencode.diffs",
name: "diff",
data: { mode: "branch", sessionID: "session-1", returnRoute: startRoute },
},
@@ -342,7 +342,7 @@ test("branch diff source requests branch VCS diff", async () => {
try {
expect(viewer.current()).toEqual({
type: "plugin",
id: "diff-viewer",
id: "opencode.diffs",
name: "diff",
data: { mode: "branch", sessionID: "session-1", returnRoute: startRoute },
})