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.