userguidance

package
v0.1.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Title    string       `yaml:"title"`
	URI      protocol.URI `yaml:"uri"`
	External bool         `yaml:"external"`
	Save     bool         `yaml:"save"`
}

Action represents an action that can be taken in response to a message.

type Controller

type Controller interface {
	StartupInfo(ctx context.Context) (ulspplugin.PluginInfo, error)
	OutputMessage(ctx context.Context, msg Message) error
	NotifyMessage(ctx context.Context, msg Message) (*Action, error)
}

Controller defines the interface for a guidance controller.

func New

func New(p Params) (Controller, error)

New creates a new controller to provide messaging with information about uLSP usage.

type Message

type Message struct {
	Key     string                  `yaml:"key"`
	Kind    userGuidanceMessageKind `yaml:"kind"`
	Message string                  `yaml:"message"`
	Type    string                  `yaml:"type"`
	Actions []Action                `yaml:"actions"`
}

Message represents a user guidance message.

type Params

type Params struct {
	fx.In

	Sessions   session.Repository
	IdeGateway ideclient.Gateway
	Config     config.Provider
	FS         fs.UlspFS
}

Params are inbound parameters to initialize a new plugin.

Jump to

Keyboard shortcuts

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