Documentation
¶
Overview ¶
Package extensionset holds the in-process half of the extension set DefaultResourceLoader loads: the inline and built-in extension factories (resource-loader.ts loadExtensionFactories, loadExtensionPaths' `builtin:` branch) and omitReplacedExtensions. The CLI's extension set and coding.DefaultResourceLoader both call it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuiltinNames ¶
func BuiltinNames(extensions []extension.InlineExtension) []string
BuiltinNames are the names of the entries of extensions that supply `builtin:<name>` code, in order. Ports .upstream/v1.1.0/packages/coding-agent/src/core/resource-loader.ts:378-383 (the builtinExtensions Map keys).
func HasInline ¶
func HasInline(extensions []extension.InlineExtension) bool
HasInline reports whether extensions holds an inline extension that is not built-in, which loadExtensionFactories loads.
func OmitReplaced ¶
func OmitReplaced(extensions []extension.Extension, warnings *[]icodingagent.ExtensionWarning) []extension.Extension
OmitReplaced leaves out the replaceable extensions that share a tool, command or flag name with another extension. A replaced built-in extension adds a warning to warnings. Ports .upstream/v0.99.1/packages/coding-agent/src/core/resource-loader.ts:114-157 (omitReplacedExtensions).
Types ¶
type LoadError ¶
type LoadError struct{ Path, Error string }
LoadError is a {path, error} entry of types.ts LoadExtensionsResult.errors.
type Loader ¶
type Loader struct {
CWD string
// Inline are the extensionFactories: built-in and inline extensions.
Inline []extension.InlineExtension
// Runtime is the runtime the factories register against. Nil: the loader creates one, which factoryRuntime returns.
Runtime *extension.ExtensionRuntime
// EventBus is the bus the factories share. Nil: the loader creates one.
EventBus extension.EventBus
}
Loader runs the extension factories of one cwd.
func (*Loader) LoadBuiltin ¶
LoadBuiltin runs the factory of each `builtin:<name>` path. An unknown name is a load error. A built-in extension's source info is the synthetic one of its path, scope "temporary", whichever settings scope enabled it: applyExtensionSourceInfo resolves a synthetic path with getDefaultSourceInfoForPath (resource-loader.ts:906-975). Ports .upstream/v0.99.1/packages/coding-agent/src/core/resource-loader.ts:706-735 (loadExtensionPaths).
func (*Loader) LoadInline ¶
LoadInline runs the factories of the extensions that are not built-in, naming each `<inline:name>`. Ports .upstream/v0.99.1/packages/coding-agent/src/core/resource-loader.ts:1122-1145 (loadExtensionFactories).