cli

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chat

func Chat(ctx context.Context, serverAddr, authToken, initialMessage string) error

Chat 启动交互式聊天会话,连接至指定的 Leros 服务端。 如果 initialMessage 为非空字符串,则将其作为首条消息发送,否则提示用户输入。

func DetailProject

func DetailProject(ctx context.Context, serverAddr, authToken, publicID string) (*contract.ProjectDetail, error)

DetailProject 调用服务端 DetailProject API 并返回解析后的结果。

func DownloadSkillCache added in v0.1.17

func DownloadSkillCache(ctx context.Context, serverAddr, authToken, skillID, source, version string) ([]byte, error)

DownloadSkillCache fetches a skill cache zip from the server's download endpoint.

func GetDigitalAssistantByID

func GetDigitalAssistantByID(ctx context.Context, serverAddr, authToken string, id uint) (*contract.DigitalAssistantDetail, error)

GetDigitalAssistantByID 调用服务端 GetDigitalAssistant API 并返回解析后的结果。

func GetPresignUploadURL added in v0.1.17

func GetPresignUploadURL(ctx context.Context, serverAddr, authToken, bucket, key string) (string, error)

GetPresignUploadURL fetches a presigned upload URL for the given bucket and key.

func GetProject

func GetProject(ctx context.Context, serverAddr, authToken, publicID string) (*contract.Project, error)

GetProject 调用服务端 GetProject API 并返回解析后的结果。

func GetSession

func GetSession(ctx context.Context, serverAddr, authToken, sessionID string) (*contract.Session, error)

GetSession 调用服务端 GetSession API 并返回解析后的结果。

func GetSessionMessages

func GetSessionMessages(ctx context.Context, serverAddr, authToken, sessionID string, page, perPage int) (*contract.MessageList, error)

GetSessionMessages 调用服务端 GetSessionMessages API 并返回解析后的结果。

func GetTask

func GetTask(ctx context.Context, serverAddr, authToken, publicID string) (*contract.Task, error)

GetTask 调用服务端 GetTask API 并返回解析后的结果。

func ListProjectFiles added in v0.1.19

func ListProjectFiles(ctx context.Context, serverAddr, authToken, projectID, resourceType, taskID string) ([]contract.FileTreeNode, error)

ListProjectFiles 调用服务端项目文件树接口,按 project + resource_type + task 过滤。

func ListProjects

func ListProjects(ctx context.Context, serverAddr, authToken string, req *contract.ListProjectsRequest) (*contract.ProjectList, error)

ListProjects 调用服务端 ListProjects API 并返回解析后的结果。

func ListSessions

func ListSessions(ctx context.Context, serverAddr, authToken string, req *contract.ListSessionsRequest) (*contract.SessionList, error)

ListSessions 调用服务端 ListSessions API 并返回解析后的结果。

func ListTasks

func ListTasks(ctx context.Context, serverAddr, authToken string, req *contract.ListTasksRequest) (*contract.TaskList, error)

ListTasks 调用服务端 ListTasks API 并返回解析后的结果。

func ResolveUserName

func ResolveUserName(ctx context.Context, serverAddr, authToken string, uin uint) string

ResolveUserName 通过 Uin 解析用户名称。

Types

type StorageConfig added in v0.1.17

type StorageConfig struct {
	Scheme string `json:"scheme"`
	Bucket string `json:"bucket"`
}

StorageConfig represents storage configuration returned by the server.

func GetStorageConfig added in v0.1.17

func GetStorageConfig(ctx context.Context, serverAddr, authToken string) (*StorageConfig, error)

GetStorageConfig fetches the storage configuration from the server.

Jump to

Keyboard shortcuts

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