Skip to content

Feature Flags: Before/After Evidence ​

Every kbengine.* switch changes real UI behavior. This page pairs each switch with a real before/after capture: the pipeline boots a genuine VS Code instance (extension installed from the packaged VSIX) inside Xvfb against a KBEngine demo workspace, flips the one switch in workspace settings, restarts the extension host per state, poses the affected surface (editor / hover / command panel), and stitches the two real screenshots into an animated GIF with ffmpeg.

The whole thing is scripted and rerunnable — no hand-drawn mock-ups:

bash
python3 scripts/config-switch-gifs/generate.py --list           # switch inventory
python3 scripts/config-switch-gifs/generate.py --all            # capture every GIF-able switch
python3 scripts/config-switch-gifs/generate.py --switch inlay-type-data

Prerequisites: Xvfb, xdotool, ImageMagick import, ffmpeg, VS Code CLI, and a packaged VSIX (see scripts/config-switch-gifs/generate.py). Capture runs against a throwaway /tmp workspace — the repo only gains PNG/GIF files under docs/public/config-switch-gifs/ plus a manifest.json.

Diagnostics ​

Real-time syntax diagnostics — kbengine.enableDiagnostics ​

Off: .def files are no longer checked live — red squiggles and Problems panel entries disappear.

enable-diagnostics (off / on)

Duplicate definition check — kbengine.diagnostics.checkDuplicateDefinitions ​

On: a property declared twice in the same .def is flagged as a duplicate-definition Warning.

check-duplicate-definitions (off / on)

Hover ​

Hover tag docs — kbengine.hover.showTagDocs ​

On: hovering a .def tag such as <Flags>/<Type> pops a card explaining what the tag means.

hover-show-tag-docs (off / on)

Hover value docs — kbengine.hover.showValueDocs ​

On: hovering a value like BASE_AND_CLIENT pops a card explaining where that flag propagates.

hover-show-value-docs (off / on)

Hover Implemented-By — kbengine.hover.implementedBy ​

On: hovering a def method shows where the script implements it (Implemented-By backlink, file:line).

hover-implemented-by (off / on)

CodeLens ​

RPC method CodeLens — kbengine.codeLens.rpc ​

On: an RPC marker CodeLens appears above the implementing method of a def-declared RPC in entity scripts.

codelens-rpc (off / on)

types.xml storage mirror CodeLens — kbengine.codeLens.typesXml ​

On: a storage-mirror CodeLens (reference back-scan) appears above type declarations in types.xml.

codelens-types-xml (off / on)

Inlay hints ​

Property type inlay hints — kbengine.inlayHints.typeData ​

On: inline : <type> hints at self.<property> accesses, from the def/types.xml declaration.

inlay-type-data (off / on)

def parameter inlay hints — kbengine.inlayHints.defParams ​

On: unannotated parameters of methods declared in def script sections get inline type hints.

inlay-def-params (off / on)

Hot reload ​

Hot reload master switch — kbengine.hotReload.enabled ​

Off: the hot-reload status-bar item reads 未开启: kbengine.hotReload.enabled=false (watch-off icon); on (with globs set) it goes ready — saving a .py fires the default hot-reload request. Watch the bottom status bar.

hot-reload-enabled (off / on)

Panels ​

Call chain panel initial view — kbengine.python.callChainView ​

text → graph: the Show Call Chain panel opens as a mermaid graph or as plain text.

call-chain-view (text / graph)

Captured switch summary ​

SettingSwitchStatesEffect
kbengine.enableDiagnosticsReal-time syntax diagnosticsfalse → trueWith it off, .def files are no longer checked live: red squiggles and Problems panel entries disappear
kbengine.diagnostics.checkDuplicateDefinitionsDuplicate definition checkfalse → trueWhen on, a property/method declared twice in the same .def is flagged as a duplicate-definition Warning
kbengine.hover.showTagDocsHover tag docsfalse → trueHovering a .def tag such as <Flags>/<Type> pops a card explaining what the tag means
kbengine.hover.showValueDocsHover value docsfalse → trueHovering a value like BASE_AND_CLIENT pops a card explaining where that flag propagates
kbengine.hover.implementedByHover Implemented-Byfalse → trueHovering a def method shows where the script implements it (Implemented-By backlink, file:line)
kbengine.codeLens.rpcRPC method CodeLensfalse → trueAn RPC marker CodeLens appears above the implementing method of a def-declared RPC in entity scripts
kbengine.codeLens.typesXmltypes.xml storage mirror CodeLensfalse → trueA storage-mirror CodeLens (reference back-scan) appears above type declarations in types.xml
kbengine.inlayHints.typeDataProperty type inlay hintsfalse → trueInline : <type> hints at self.<property> accesses, from the def/types.xml declaration
kbengine.inlayHints.defParamsdef parameter inlay hintsfalse → trueUnannotated parameters of methods declared in def script sections get inline type hints
kbengine.hotReload.enabledHot reload master switchfalse → trueOff, the hot-reload status-bar item reads 未开启 (watch-off); on (with globs set) it goes ready — saving a .py fires the default hot-reload request
kbengine.python.callChainViewCall chain panel initial viewtext → graphThe Show Call Chain panel opens as a mermaid graph (graph) or as plain text (text)

Manual-capture switches ​

These switches are real but their effect does not present as a headless-capturable UI state (needs a wizard drive, a file edit mid-capture, or lands as a settings-file diff rather than pixels). They are documented here; the pipeline marks them capture: false in scripts/config-switch-gifs/switches.json so reruns skip them honestly.

SettingSwitchStatesEffect
kbengine.hover.showSymbolDocsHover symbol docsfalse → trueHovering a custom property/method name shows its summary
kbengine.hover.typeStorageHover type storagefalse → trueHovering a custom type in types.xml shows its storage table/column/type info
kbengine.hover.eventStatsHover event statsfalse → trueHovering an event constant shows registration/listener stats
kbengine.hover.serverConfigHover server configfalse → trueHovering a kbengine.xml entry shows its resolved value and docs
kbengine.hover.startupScriptHover startup argsfalse → trueHovering KBEngine startup args/env vars in .sh/.bat scripts shows their docs
kbengine.hover.returnTypeInferenceHover return-type inferencefalse → trueHovering a local variable infers its type from function annotations
kbengine.hover.entityRegistrationHover entity registrationfalse → trueHovering an entity class shows its entities.xml registration (Utype/index position)
kbengine.hover.defChainHover def chainfalse → trueHovering a def property/method shows its declaration chain (file and section origin)
kbengine.codeLens.eventCallbacksEvent callback CodeLensfalse → trueAn event-callback marker appears above event handler functions in Python scripts
kbengine.codeLens.propertyProperty marker CodeLensfalse → trueA property marker CodeLens appears above self.<property> accesses
kbengine.python.builtinTypeInlayHintsBuiltin property inlay hintsfalse → trueInline : <type> hints after self.<builtin property> accesses such as self.id
kbengine.enableStructureDiagnostics.def structure validationfalse → trueStructural issues (duplicates, misplaced tags, missing fields) are flagged
kbengine.autoRefreshFinalConfigFinal config auto-refreshfalse → trueThe final-config view recomputes itself when the engine config files change
kbengine.generator.generatePythonGenerator: Python filesfalse → trueWhether the entity generation wizard also writes the Python entity file
kbengine.generator.registerInEntitiesXmlGenerator: entities.xml registrationfalse → trueWhether generated entities are auto-registered in entities.xml
kbengine.entity.methodStubBodyMethod stub bodypass → raiseGenerated implementation skeletons get a pass body or raise NotImplementedError
kbengine.python.callChainHintsCall chain entry hintsfalse → trueA Call Chain hint shows at method entries; off also disables Show Call Chain previews
kbengine.jsoncAssociationdebug.json jsonc associationfalse → trueOn activation writes a files.association mapping debug.json to jsonc into workspace settings
kbengine.python.extraPathsSyncextraPaths auto-syncfalse → trueWrites the KBEngine scripts root into python.analysis.extraPaths
kbengine.webviewConsoleLogsWebview console capturefalse → trueWebview console errors are captured into the log panel (internal behavior)
kbengine.hotReload.tempEdit.enabledHot reload temp editfalse → trueOn, the one-shot hot-reload flow takes the temp-edit → reloadScript → auto-restore path (default off, accident guard)
kbengine.debug.debugpyInjectdebugpy injectionfalse → trueOn, a debug session injects debugpy into the target process and reports on the debug status board; off, no injection
kbengine.debug.autoDebugpyAuto debugpyfalse → trueOn, debug startup auto-discovers/launches a debugpy listener and waits for attachment (default off)
kbengine.runtimeQuery.enabledRuntime Queries panelfalse → trueThe panel always opens; off, in-panel queries/streaming error with "enable kbengine.runtimeQuery.enabled"; on, queries work
kbengine.showFinalConfigOnOpenAuto-open final config viewfalse → trueOn, opening the engine defaults file tries to auto-open the final-config view beside it (needs a runnable engine bin for the computation; without an engine the auto-open does not trigger)

Kode documentation