style: fix gci import grouping and godoc formatting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
mingmxren 2026-03-04 01:22:09 +08:00
parent 58f7b5bf2f
commit aead637d10
2 changed files with 9 additions and 7 deletions

View file

@ -1,8 +1,10 @@
package channels package channels
import "context" import (
"context"
import "github.com/sipeed/picoclaw/pkg/commands" "github.com/sipeed/picoclaw/pkg/commands"
)
// TypingCapable — channels that can show a typing/thinking indicator. // TypingCapable — channels that can show a typing/thinking indicator.
// StartTyping begins the indicator and returns a stop function. // StartTyping begins the indicator and returns a stop function.

View file

@ -16,14 +16,14 @@ type SubCommand struct {
// Definition is the single-source metadata and behavior contract for a slash command. // Definition is the single-source metadata and behavior contract for a slash command.
// //
// Design notes (phase 1): // Design notes (phase 1):
// - Every channel reads command shape from this type instead of keeping local copies. // - Every channel reads command shape from this type instead of keeping local copies.
// - Visibility is global: all definitions are considered available to all channels. // - Visibility is global: all definitions are considered available to all channels.
// - Platform menu registration (for example Telegram BotCommand) also derives from this // - Platform menu registration (for example Telegram BotCommand) also derives from this
// same definition so UI labels and runtime behavior stay aligned. // same definition so UI labels and runtime behavior stay aligned.
type Definition struct { type Definition struct {
Name string Name string
Description string Description string
Usage string // for simple commands; ignored when SubCommands is set Usage string // for simple commands; ignored when SubCommands is set
Aliases []string Aliases []string
SubCommands []SubCommand // optional; when set, Executor routes to sub-command handlers SubCommands []SubCommand // optional; when set, Executor routes to sub-command handlers
Handler Handler // for simple commands without sub-commands Handler Handler // for simple commands without sub-commands