mentions

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Resolve

func Resolve(text string, tracked []api.Attachment, lookupFile func(candidate string) (target string, ok bool)) []api.Attachment

Resolve extracts structured attachments from user text in a single pass. It matches tracked bindings (supporting added or edited #L line ranges and tracked inline media pills such as "[Image #1]"), resolves explicit @mcp:, @file:, @rule:, and @skill: prefixes, and—when lookupFile is non-nil—resolves any remaining unbound @<candidate> tokens against the workspace file index.

Types

type ScannedToken

type ScannedToken struct {
	FullToken string // Raw token including @ and line range, e.g. "@composer.go#L10-L20"
	BaseToken string // Token without line range, e.g. "@composer.go"
	StartLine int
	EndLine   int
}

ScannedToken is an inline token starting with '@' parsed from text.

func ScanTokens

func ScanTokens(text string) []ScannedToken

ScanTokens parses all valid @tokens outside fenced code blocks from text.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL