Skip to content

Commit 88d0720

Browse files
feat(Common): Add ProvideFileDecoration and ProvideInlineCompletionItems to LanguageFeatureProviderRegistry
Extend the LanguageFeatureProviderRegistry trait in the Common crate with two new abstract methods for upcoming language feature implementations: - ProvideFileDecoration: returns badge, tooltip, and colour information for a resource URI, consumed by the file explorer and SCM tree for rendering resource state. - ProvideInlineCompletionItems: provides ghost-text completions for AI coding assistants (Copilot, Roo Code, Continue), accepting document URI, cursor position, and a context DTO. Both methods return Option<Value> over CommonError, maintaining the trait's generic DTO-passing pattern for cross-crate async dispatch.
1 parent b929d1d commit 88d0720

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

Source/LanguageFeature/LanguageFeatureProviderRegistry.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,22 @@ pub trait LanguageFeatureProviderRegistry: Environment + Send + Sync {
288288
PositionDTO:PositionDTO,
289289
) -> Result<Option<Value /* LinkedEditingRangesDTO */>, CommonError>;
290290

291+
/// Provides file decoration (badge, tooltip, colour) for a resource URI.
292+
/// Called by the file explorer / SCM tree when rendering resource state.
293+
async fn ProvideFileDecoration(&self, ResourceURI:Url) -> Result<Option<Value>, CommonError>;
294+
295+
/// Provides inline completion items (ghost text) for AI coding assistants
296+
/// such as GitHub Copilot, Roo Code, and Continue.
297+
async fn ProvideInlineCompletionItems(
298+
&self,
299+
300+
DocumentURI:Url,
301+
302+
PositionDTO_:PositionDTO,
303+
304+
ContextDTO:Value,
305+
) -> Result<Option<Value>, CommonError>;
306+
291307
/// Provides on-type formatting edits.
292308
async fn ProvideOnTypeFormattingEdits(
293309
&self,

0 commit comments

Comments
 (0)