chore: rename .agent to .agents and update skill path references

This commit is contained in:
ryan
2026-08-12 12:39:15 +08:00
parent 92322c7a22
commit a3ad0d2c97
83 changed files with 1 additions and 1 deletions
@@ -0,0 +1,40 @@
// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
package references
import (
"context"
"errors"
"fmt"
"github.com/Rain-kl/Wavelet/pkg/logger"
"go.uber.org/zap"
)
// ChannelService 示例有状态 Service(放在 internal/apps/channel/service.go)
// 需要注入 DB/客户端时使用;简单逻辑优先 logics.go 纯函数。
type ChannelService struct {
// 例如:repo ChannelRepository
}
// NewChannelService 构造函数
func NewChannelService() *ChannelService {
return &ChannelService{}
}
// Create 核心业务:首位参数必须是 context.Context;禁止依赖 Gin。
func (s *ChannelService) Create(ctx context.Context, userID int64, name string) (int64, error) {
if name == "" {
return 0, errors.New("name cannot be empty")
}
logger.Info(ctx, "channel service create",
zap.Int64("user_id", userID),
zap.String("name", name),
)
// DB 事务、远程调用等
_ = fmt.Sprintf("user=%d name=%s", userID, name)
return 1, nil
}