GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add Intent abstraction for two-way server (and plugin) → client UI interactions by the-vampiire · Pull Request #6549 · anomalyco/opencode

Conversation

@the-vampiire

@the-vampiire the-vampiire commented Dec 31, 2025

Copy link
Copy Markdown

feat: Add Intent abstraction for server→client UI interactions

Summary

This PR introduces a generic Intent abstraction that enables the server (tools, plugins, core) to request user input through the TUI. It provides composable UI primitives (form, confirm, select, multiselect, toast) following the existing Permission system's event-based pattern.

Closes: #6330 (partial — progress intent deferred)
Related: #5147, #5148, #5958, #5563

UI

I have tested it out with an askuserquestion tool plugin. I'm happy to PR this into upstream if the team wants, but this PR is focused on the foundational primitives that @malhashemi proposed in #6330:

single-select

image

multi-select

image

optional other choice (free input, available on either select types)

image

They work with keyboard (arrows, space for multi-select, esc to cancel) or mouse input.

Motivation

Currently, there's no standardized way for tools or plugins to request user input during execution. PRs #5958 and #5563 implemented askuserquestion but were TUI-only and tightly coupled. This abstraction:

  1. Enables plugins to request UI input via the new ui helpers on PluginInput
  2. Provides composable primitives that can be combined (e.g., multiselect with "Other" text field)
  3. Follows existing patterns — mirrors the Permission system's event-based architecture
  4. SDK support — full SDK regeneration with intent.respond() and intent.list() methods

What's Included vs. Issue #6330

Intent Type Issue Proposed This PR Notes
form ✅ ✅ Multi-field with conditional visibility
confirm ✅ ✅ Variants: info, warning, danger
select ✅ (field only) ✅ Added as standalone intent too
multiselect ✅ (field only) ✅ Added as standalone intent too
toast ✅ ✅ Non-blocking notification
progress ✅ ❌ Deferred See below

Why progress is Deferred

The issue proposed a progress intent with:

{
  type: "progress",
  title: string,
  message?: string,
  value: number (0-100),
  indeterminate: boolean,
  cancellable: boolean,
}

Deferred because the semantics are unclear:

  • How does the server push updates to a running progress indicator?
  • Should it use SSE/WebSocket for live updates?
  • What's the lifecycle — does the server call update() repeatedly?
  • How does cancellation flow back to the server?

This likely needs a separate design discussion. The current intent system is request/response, not streaming.

Naming Differences from Issue

Issue #6330 Proposed This PR Rationale
ui-intent module intent module Follows opencode's single-word convention
/session/:id/ui-intent/:id /session/:id/intent/:id Shorter, consistent
ui.intent.request event intent.updated event Matches Permission pattern
ui.intent.response event intent.replied event Matches Permission pattern

Additions Beyond Issue

  1. Standalone select and multiselect intents — Issue only proposed these as form fields. Added as top-level intents for simpler use cases.

  2. Conditional fields — condition: { field, equals } on TextField enables the "select with Other option" pattern mentioned in the proposal.

  3. cancelAll(sessionID) — Utility to cancel all pending intents when a session ends.

Scope Limitation: TUI Only

This PR implements TUI renderers only. Desktop and Web clients would need their own implementations of the intent dialog component. The core module and SDK are client-agnostic.


Changes

Core Intent Module (packages/opencode/src/intent/)

types.ts — Zod schemas for 5 intent types:

  • form — Multi-field input form with conditional field visibility
  • confirm — Yes/no dialog with info/warning/danger variants
  • select — Single-choice selection (2-8 options)
  • multiselect — Multi-choice selection with optional min/max
  • toast — Non-blocking notification

index.ts — State management and public API:

  • Intent.request() — Create pending intent, returns Promise
  • Intent.respond() — Submit user response
  • Intent.list() — List pending intents
  • Intent.cancelAll() — Cancel all intents for a session
  • Convenience helpers: Intent.form(), Intent.confirm(), Intent.select(), Intent.multiselect(), Intent.toast()
  • Bus events: Intent.Event.Updated, Intent.Event.Replied

Server Endpoints (packages/opencode/src/server/server.ts)

  • POST /session/:sessionID/intent/:intentID — Submit response to pending intent
  • GET /intent — List all pending intents

TUI Integration (packages/opencode/src/cli/cmd/tui/)

component/dialog-intent.tsx — Full dialog component with renderers for all intent types:

  • ConfirmDialog — Left/right arrow navigation, enter to confirm
  • SelectDialog — Up/down navigation, enter to select
  • MultiSelectDialog — Space to toggle, enter to submit
  • FormDialog — Tab between fields, enter to submit

app.tsx — Event subscription:

  • Subscribes to Intent.Event.Updated
  • Shows DialogIntent for blocking intents
  • Routes toast intents to existing toast system

SDK (packages/sdk/)

Regenerated with:

  • client.intent.respond() — Submit intent response
  • client.intent.list() — List pending intents

Plugin API (packages/plugin/src/index.ts)

Added UIHelpers type and ui property to PluginInput:

export type UIHelpers = {
  form(ctx, input): Promise<Record<string, any>>
  confirm(ctx, input): Promise<boolean>
  select(ctx, input): Promise<string | undefined>
  multiselect(ctx, input): Promise<string[]>
  toast(ctx, input): Promise<void>
}

export type PluginInput = {
  // ... existing fields
  ui?: UIHelpers  // Available when running with intent support
}

Plugin Wiring (packages/opencode/src/plugin/index.ts)

UIHelpers implementation that wraps Intent module:

ui: {
  form: (ctx, input) => Intent.form({ ...ctx, ...input, source: "plugin", plugin: name }),
  // ... other helpers
}

Usage Examples

Plugin requesting user confirmation

const plugin: Plugin = async ({ ui }) => ({
  tool: {
    dangerous_operation: {
      description: "Does something dangerous",
      parameters: z.object({ path: z.string() }),
      async execute({ parameters, sessionID, messageID }) {
        if (ui) {
          const confirmed = await ui.confirm(
            { sessionID, messageID },
            {
              title: "Confirm Operation",
              message: `This will modify ${parameters.path}. Continue?`,
              variant: "danger",
            }
          )
          if (!confirmed) return { title: "Cancelled", output: "User cancelled" }
        }
        // proceed with operation...
      },
    },
  },
})

Tool with form input

const result = await ui.form(
  { sessionID, messageID },
  {
    title: "Configure Database",
    fields: [
      {
        type: "select",
        id: "type",
        label: "Database Type",
        options: [
          { value: "pg", label: "PostgreSQL" },
          { value: "mysql", label: "MySQL" },
          { value: "other", label: "Other" },
        ],
      },
      {
        type: "text",
        id: "custom_type",
        label: "Specify database",
        condition: { field: "type", equals: "other" },  // Only shown when "Other" selected
      },
    ],
  }
)
// result = { type: "pg" } or { type: "other", custom_type: "cockroachdb" }

Testing

Unit Tests

8 unit tests covering:

  • Intent creation and response resolution
  • Cancel handling
  • All 5 intent types (form, confirm, select, multiselect, toast)
  • Event emission
  • Session-scoped cancellation
bun test packages/opencode/test/intent/intent.test.ts

Manual Testing

See MANUAL_TESTING.md for step-by-step TUI testing instructions.


Design Decisions

  1. Following Permission pattern — Uses the same event-based architecture with pending state and promise resolution

  2. Composable primitives — Form fields use the same schemas as standalone intents, enabling composition

  3. Non-blocking toast — Toast returns immediately and doesn't create pending state

  4. Session-scoped cleanup — cancelAll() clears all pending intents when session ends

  5. Schema limits — Options capped at 2-8 items, fields at 1-10 to prevent UI overload

  6. Optional ui on PluginInput — Plugins must check if (ui) before using, as it may not be available in all contexts (headless mode, non-TUI clients)

  7. Separate dialog-intent vs reusing dialog-select — Intentionally kept as separate components despite functional overlap. Analysis below.

  8. Modal dialog vs inline input replacement — Chose modal overlay rather than replacing the input area (Claude Code style). Analysis below.

Why Modal Dialog Instead of Inline Input Replacement

Claude Code replaces the input textarea with the question UI, keeping the user "in flow" with the conversation. We considered this but chose a modal dialog instead.

Approach Comparison

Aspect Modal Dialog (This PR) Inline Replacement (Claude Code)
Context visibility Obscures conversation Conversation visible
User mental model "I'm answering a question" "I'm continuing the conversation"
Complex forms ✅ Multiple fields, selects, conditions ❌ Awkward for multi-field
Implementation New component, self-contained Modify input component state machine
Partial input handling N/A (separate UI) Must save/restore draft text
Escape behavior Close modal, cancel intent Unclear—restore input? Cancel?

Why Modal Fits OpenCode

  1. Consistent with existing UI — OpenCode already uses modals for:

    • Model picker (Ctrl+K)
    • Command palette (Ctrl+P)
    • Session list, theme picker, MCP config
    • All 14 existing dialog components

    Adding another modal is expected behavior. Inline replacement would be the outlier.

  2. Supports all intent types — Modal naturally handles:

    • confirm — Yes/No buttons
    • select — Option list with keyboard nav
    • multiselect — Checkboxes with space to toggle
    • form — Multiple fields with conditions

    Inline replacement works well for simple text input but becomes awkward for structured selection UI.

  3. Clear escape hatch — Esc closes modal and cancels the intent. With inline replacement, the semantics are muddier—does Esc restore the previous input? Cancel the whole operation? Users would need to learn new behavior.

  4. Implementation isolation — Modal is a new component (dialog-intent.tsx) with no coupling to the input system. Inline replacement would require:

    • Modifying input component to accept "replacement" mode
    • Saving/restoring partial user input
    • Handling edge cases (what if user was mid-edit?)
    • Changes to focus management

Future Consideration

Inline replacement could be offered as an optional UX mode in a future PR if users prefer the Claude Code style. This would be additive—the modal implementation provides a working baseline, and inline could be added as intent.display: "inline" | "modal" in config.

This keeps the current PR focused on the Intent API and plugin integration, deferring UX experimentation to a separate effort.

Why dialog-intent is a Separate Component

We considered three options for the TUI dialog implementation:

Option Description Risk
1. Keep separate New dialog-intent.tsx with its own Select/MultiSelect Low
2. Compose dialog-intent uses DialogSelect internally Medium
3. Extract primitives Shared OptionList component both use High

We chose Option 1. Here's why:

Functional Overlap

Aspect dialog-select dialog-intent
Purpose General TUI selection Intent API communication
Trigger Direct TUI invocation Agent Intent events
Search/Filter ✅ Fuzzy search ❌ None needed
Categories ✅ Grouped options ❌ Flat list
Intent Types Select only Confirm, Select, MultiSelect, Form
Form Fields ❌ ✅ With conditions

Risk Assessment

Test coverage for TUI components: None

dialog-select.tsx    → 0 tests (14 consumer components)
dialog-intent.tsx    → 0 tests (new, 1 consumer)
Intent API           → 8 tests (core module only)

DialogSelect consumers (14 files):

  • dialog-command, dialog-model, dialog-provider, dialog-mcp
  • dialog-agent, dialog-session-list, dialog-theme-list, dialog-stash
  • dialog-tag, dialog-timeline, dialog-fork-from-timeline
  • dialog-message, dialog-subagent

Option 3 would require:

  • Refactoring a core component with 14 consumers
  • Zero test coverage to catch regressions
  • Manual testing of all 14 dialog types
  • High likelihood of rejection due to risk

Recommendation for Future

If abstracting shared primitives is desired:

  1. Separate PR — Do not bundle with Intent feature
  2. Add tests first — Cover DialogSelect before refactoring
  3. Extract incrementally — Start with one shared primitive (e.g., OptionList)
  4. Keep Intent decoupled — Intent feature should not depend on this refactor

This keeps the Intent PR focused, reviewable, and low-risk.


Future Work (Not in this PR)

  • progress primitive — Needs design for streaming updates
  • Desktop/Web client renderers
  • Rich text/markdown in messages
  • File picker intent
  • Date/time picker intent

Checklist

  • Types defined with Zod schemas
  • State management follows Instance pattern
  • Bus events for lifecycle
  • Server endpoints added
  • TUI dialogs implemented
  • Keyboard navigation working
  • SDK regenerated
  • Plugin API extended
  • Unit tests passing
  • Manual testing guide included
  • Documentation in code comments

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

arsham and eXamadeus reacted with thumbs up emoji eXamadeus and aryasaatvik reacted with hooray emoji
All reactions
  • 👍 2 reactions
  • 🎉 2 reactions
@the-vampiire the-vampiire mentioned this pull request Dec 31, 2025
[FEATURE]: Generic UI Intent Channel for cross-client plugin-driven UX #6330
Closed
1 task done
@the-vampiire
the-vampiire marked this pull request as ready for review December 31, 2025 22:07
@the-vampiire

the-vampiire commented Dec 31, 2025

Copy link
Copy Markdown
Author

Documentation Added

Added documentation for the Intent system to the website docs:

New Files

  • intent.mdx — Complete guide for the Intent API including:
    • Overview of all 5 intent types (confirm, select, multiselect, form, toast)
    • Detailed options and return types for each
    • Conditional field examples for forms
    • Keyboard navigation reference
    • Cancellation handling
    • Complete plugin example

Updated Files

  • plugins.mdx — Added:

    • Intent events (intent.updated, intent.replied) to Events section
    • "User input with Intents" section with UI helpers overview and example
  • sdk.mdx — Added:

    • Intent API methods (intent.list(), intent.respond())
    • Usage examples for different intent types

Docs build successfully ✅

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@the-vampiire the-vampiire changed the title Add Intent abstraction for server→client UI interactions Add Intent abstraction for two-way server (and plugin) → client UI interactions Dec 31, 2025
eXamadeus
eXamadeus reviewed Jan 3, 2026
View reviewed changes

@eXamadeus eXamadeus left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks great. I'd love to see some version of this make it into the upstream!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/opencode/src/cli/cmd/tui/component/dialog-intent.tsx Resolved

Uh oh!

There was an error while loading. Please reload this page.

the-vampiire added 12 commits January 3, 2026 22:21
@the-vampiire
feat(intent): add intent module with composable UI primitives
5cd031f
- Add Intent namespace with form, confirm, select, multiselect, toast primitives
- Add IntentInfo and IntentResponse schemas for request/response cycle
- Add server endpoints: POST /session/:id/intent/:id, GET /intent
- Add Bus events: intent.updated, intent.replied
- Add convenience helpers: Intent.form(), Intent.confirm(), Intent.select(), etc.
- Add timeout and cancellation support
- Add unit tests covering all intent types and edge cases
@the-vampiire
feat(intent): add TUI integration for intent dialogs
fdab3f7
- Add dialog-intent.tsx with confirm, select, multiselect, form renderers
- Wire Intent.Event.Updated subscription in app.tsx
- Toast intents use existing toast system
- Fix Zod schema types to support optional fields with defaults
- Add z.input<> types for function parameters
@the-vampiire
feat(intent): add SDK methods and plugin UIHelpers
6011230
- Regenerate SDK with intent.respond() and intent.list() methods
- Add UIHelpers type to PluginInput (form, confirm, select, multiselect, toast)
- Wire up plugin loader to provide UI helpers via Intent module
- Update dialog-intent component with improved field handling
@the-vampiire
chore(intent): align with style guide - remove comments and else stat…
9e86ca9
…ements
@the-vampiire
docs: update PR description and add manual testing guide
df74ced
@the-vampiire
fix(intent): improve dialog UX with keyboard nav, focus handling, and…
2044c9f
… design documentation

- Add evt.preventDefault() to all keyboard handlers to prevent event leaking
- Change form submit from ctrl+enter to enter
- Convert select/multiselect field renderers to vertical layout
- Add keyboard navigation (up/down) to form field renderers
- Add space to toggle for multiselect field renderer
- Auto-focus text inputs when they become visible (conditional fields)
- Support array values in condition checks for multiselect
- Document design decision to keep dialog-intent separate from dialog-select
@the-vampiire
docs: add modal vs inline input design decision rationale
f7afb25
@the-vampiire
removed PR and manual testing docs
659ba76
@the-vampiire
docs: add Intent documentation with examples
c0adbb1
@the-vampiire
refactor(intent): narrow intent types at parent level per PR review
1fc0596
Co-locate type casts with Switch/Match guards following the pattern
established in session/index.tsx (UserMessage/AssistantMessage).

Child components now receive narrowed types directly, removing redundant
inline type assertions.
@the-vampiire
chore: apply prettier formatting
83e67cd
@the-vampiire
refactor(server): extract IntentRoute to fix TS2589 type depth error
93206b6
Follow existing pattern (ProjectRoute, TuiRoute) by extracting intent
endpoints to separate Hono instance. Fixes TypeScript type chain
depth limit exceeded error.

API change: /session/:sessionID/intent/:intentID -> /intent/:sessionID/:intentID
@the-vampiire
the-vampiire force-pushed the feat/intent branch from 8fa8d96 to 93206b6 Compare January 4, 2026 06:07
the-vampiire added 2 commits January 4, 2026 02:59
@the-vampiire
fix(intent): align with codebase patterns per conformance analysis
f3ef125
Critical fixes:
- dialog-intent.tsx: Fix API URL from /session/x/intent/y to /intent/x/y
  (was calling wrong endpoint, would have failed at runtime)

- intent.test.ts: Flatten test structure to match canonical next.test.ts
  (codebase uses flat test() calls, not nested describe blocks)

Standard fixes:
- server/intent.ts: Split hono-openapi imports per project.ts pattern
  (describeRoute, validator on line 2; resolver on line 3)

Verified via systematic comparison against:
- permission/index.ts, permission/next.ts (core module patterns)
- server/project.ts (route patterns)
- test/permission/next.test.ts (test patterns)

All tests pass (8/8), typecheck clean, formatter produces no changes.
@the-vampiire
Merge branch 'dev' into feat/intent
6b8574e
@the-vampiire

the-vampiire commented Jan 4, 2026

Copy link
Copy Markdown
Author

i spent some extra time with claude to develop an idiomatic contribution guide. we used it to do a thorough review and align the PR with the code base. then we revisited it based on the experience to refine it.

its out of scope so i didnt commmit it, but if you think its helpful i can add it for other contributors (here or in another PR).

idioatic contributor guide

# Idiomatic Contribution Guide

Mental Model

You are a guest in someone else's home.

The existing codebase represents years of decisions, trade-offs, and evolved conventions. Every pattern you encounter—whether you personally agree with it or not—is the canonical standard. Your contribution must blend seamlessly, as if a core maintainer wrote it themselves.

Core Principles

  1. The codebase is gospel — Existing patterns define correctness. There is no "better way" for a contributor to propose through code style alone.

  2. Blend, don't stand out — A successful contribution is invisible. Reviewers should not be able to distinguish your code from existing code.

  3. When in doubt, find precedent — Every decision should trace back to an existing pattern. If no precedent exists, ask before inventing.

  4. Fix nothing unrelated — Touch only what your feature requires. Pre-existing inconsistencies are not your concern.

  5. Leave no drift — Your PR must have zero idiomatic deviation. Partial conformance is non-conformance.


Approach

Phase 1: Establish Baseline

Before writing any code:

  1. Identify the module — Where does your change live? (server, TUI, core, types, tests, docs)
  2. Find canonical references — Locate at least 2 files in the same directory/layer that do similar things
  3. Study patterns — Note imports, exports, naming, structure, error handling, types

Phase 2: Implement with Conformance

While writing code:

  1. Mirror structure — Match file organization, function ordering, grouping
  2. Copy conventions — Use identical naming patterns, spacing, comment style
  3. Reuse utilities — If a helper exists, use it. Never reinvent.
  4. Match types — Use the same type definition patterns (Zod vs TS, namespaces vs named exports)

Phase 3: Validate Conformance

Before submitting:

  1. Diff against references — Compare your files to canonical references line-by-line
  2. Run all checks — Typecheck, format, lint, test
  3. Regenerate artifacts — SDK, types, any generated files
  4. Self-review as maintainer — Would you accept this if you owned the codebase?

Pattern Discovery

Finding Canonical References

Minimum 2 references required — A single reference can be an exception to the codebase norm. Multiple references reveal the actual pattern.

Your file location        →  Look for references in
─────────────────────────────────────────────────────
src/server/*.ts           →  src/server/project.ts, src/server/tui.ts
src/cli/cmd/tui/component →  Other files in same directory
src/tool/*.ts             →  src/tool/read.ts, src/tool/write.ts
test/**/*.test.ts         →  Adjacent test files in same module

Why 2+ References Matter

A single reference can mislead you into following an exception rather than the rule.

Example from real PR:

  • Initial reference: permission/index.ts uses class extends Error
  • Conclusion: PR's NamedError.create() appears to be a deviation ❌

After checking more references:

  • 17 files use NamedError.create() (34 occurrences)
  • 3 files use class extends Error (5 occurrences)
  • Revised conclusion: PR follows the dominant pattern ✅

The first reference was the exception, not the rule.

When References Conflict

If canonical references show different patterns:

  1. Count occurrences across the codebase (grep/search)
  2. Dominant pattern wins — follow the majority
  3. Document your finding — note the count in PR description

Example: "NamedError.create() used in 17 files (34 instances) vs class extends Error in 3 files (5 instances) → followed dominant pattern"

Pattern Categories to Match

Category What to compare
Imports Order, grouping, path style (@/ vs relative)
Exports Named vs default, namespace pattern
Naming Functions, variables, types, files
Types Zod schemas, TS interfaces, generics
Structure Function order, grouping, file organization
Error handling Try/catch vs .catch(), error types
Components Props interface, hooks, state patterns
Routes Hono patterns, validators, response format
Tests Describe/it structure, fixtures, assertions
Docs Heading style, code block format, tone

Status Classifications

When analyzing conformance, use only these statuses:

Status Meaning Action
✅ Conformant Matches canonical pattern None
❌ Drift Deviates from pattern Fix required

There is no "acceptable deviation" — Either validate via multiple references that your approach IS the pattern, or fix it. Ambiguity = unresolved work.

If you're tempted to mark something "acceptable" or "minor," you haven't done enough research. Find more references until you can definitively say conformant or drift.


Issue Severity

Not all drift is equal. Prioritize fixes by severity:

Tier Description Example
Critical Would break at runtime Wrong API URL path, missing required field
Standard Violates established pattern Wrong test structure, incorrect import style
Stylistic Minor format difference Import line ordering, spacing

Fix all tiers, but prioritize critical issues first. A stylistic fix means nothing if the code doesn't work.


When Deviation May Be Justified

Deviation from pattern is acceptable ONLY when:

  1. Quantifiable complexity difference — e.g., 142 lines of nested types vs typical 30-line inline schema
  2. Pattern exists elsewhere — another module uses the same approach (precedent exists)
  3. Documented justification — PR explains why this case differs

If you can't quantify why you're different, you're not different enough.

Example justification:

"Intent types use separate types.ts file (142 lines of nested discriminated unions) rather than inline schemas. Precedent: acp/types.ts also separates complex types. Complexity justifies separation for maintainability."


Examples

Good: Following Route Pattern

// Canonical reference: src/server/project.ts
export const ProjectRoute = new Hono()
  .get("/", describeRoute({...}), async (c) => {...})
  .patch("/:id", describeRoute({...}), validator(...), async (c) => {...})

// Your contribution: src/server/intent.ts
export const IntentRoute = new Hono()
  .get("/", describeRoute({...}), async (c) => {...})
  .post("/:id", describeRoute({...}), validator(...), async (c) => {...})

Bad: Inventing New Patterns

// Your contribution introduces different style
const intentRouter = new Hono()  // Wrong: different naming convention
intentRouter.get(...)            // Wrong: not chained
export default intentRouter      // Wrong: default export vs named

Good: Type Narrowing at Match Site

// Canonical reference: src/cli/cmd/tui/routes/session/index.tsx
<Match when={message.role === "user"}>
  <UserMessage message={message as UserMessage} />
</Match>

// Your contribution follows same pattern
<Match when={intent.type === "confirm"}>
  <ConfirmDialog intent={intent as ConfirmIntent} />
</Match>

Do

  • Do study existing code before writing new code
  • Do find at least 2 canonical references for every file you create
  • Do count pattern occurrences when references conflict
  • Do match patterns exactly, even if you'd do it differently
  • Do run all validation (typecheck, format, test) before submitting
  • Do regenerate SDK/artifacts when touching API surfaces
  • Do ask maintainers when no precedent exists

Don't

  • Don't rely on a single canonical reference
  • Don't mark deviations as "acceptable" without quantified justification
  • Don't introduce new patterns, conventions, or styles
  • Don't "improve" existing code outside your feature scope
  • Don't assume your preferences are better
  • Don't leave any file with inconsistent patterns
  • Don't skip validation steps
  • Don't mix feature work with style changes

Checklist

Before marking PR ready for review:

  • Every new file has at least 2 canonical references identified
  • Conflicting patterns resolved via occurrence count
  • Imports match reference file ordering and style
  • Exports match reference file pattern
  • Naming follows established conventions
  • Type definitions use same patterns as module
  • Error handling matches module patterns
  • Tests follow existing test structure
  • All tooling passes (typecheck, format, lint)
  • Generated files regenerated if needed
  • Any deviations have quantified justification documented
  • Self-reviewed as if you were the maintainer

Summary

Your goal: Write code that a maintainer would write.

Your measure of success: A reviewer cannot distinguish your contribution from existing code.

Your mindset: Grateful guest, not opinionated visitor.

Your method: Multiple references, quantified decisions, zero ambiguity.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@the-vampiire
Merge branch 'dev' into feat/intent
6a4b88f
This was referenced Jan 5, 2026
fix(desktop): prevent multiple app instances with single-instance plugin #6922
Closed
fix: show tool input and output #6927
Closed
docs: fix permission rule ordering in examples #7010
Merged
fix(core): add dispose functions to prevent subscription memory leaks #7032
Closed
@the-vampiire the-vampiire closed this Jan 10, 2026
@the-vampiire
the-vampiire deleted the feat/intent branch January 10, 2026 14:47
@arsham

arsham commented Jan 10, 2026

Copy link
Copy Markdown

@the-vampiire I was hoping your PR would find its way into the code. Is there a reason you've closed this PR?

the-vampiire reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@the-vampiire

the-vampiire commented Jan 10, 2026

Copy link
Copy Markdown
Author

@arsham based on latest release yesterday, they have the question tool added. @thdxr took a different direction with it:

#7268

#7386

this PR was an abstract foundation for intents that question or any other tools / plugins could build on.

it's been 2 weeks since the discussion and PR, i don't think this is how they want to handle it. less so because it would be a big refactor to integrate now.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@halisyucel halisyucel mentioned this pull request May 30, 2026
[FEATURE]: Add input field to question tool options for inline text input #30028
Closed
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@eXamadeus eXamadeus eXamadeus left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@the-vampiire @arsham @eXamadeus
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.