@@ -232,7 +232,7 @@ func runTUI(cmd *cobra.Command, args []string) {
232232 }
233233 defer func () {
234234 agentCancel ()
235- tuiAgent .Stop ()
235+ _ = tuiAgent .Stop ()
236236 }()
237237
238238 // Always create a new session (unless explicitly specified)
@@ -441,6 +441,8 @@ func processTUIDialogue(
441441}
442442
443443// runAgentIteration runs a single agent iteration (copied from chat.go)
444+ //
445+ //nolint:unused
444446func runAgentIteration (
445447 ctx context.Context ,
446448 sess * session.Session ,
@@ -635,6 +637,8 @@ func runAgentIteration(
635637}
636638
637639// getLoadedSkills from session
640+ //
641+ //nolint:unused
638642func getLoadedSkills (sess * session.Session ) []string {
639643 if sess .Metadata == nil {
640644 return []string {}
@@ -646,6 +650,8 @@ func getLoadedSkills(sess *session.Session) []string {
646650}
647651
648652// setLoadedSkills in session
653+ //
654+ //nolint:unused
649655func setLoadedSkills (sess * session.Session , skills []string ) {
650656 if sess .Metadata == nil {
651657 sess .Metadata = make (map [string ]interface {})
@@ -669,6 +675,8 @@ func getUserInputHistory(sess *session.Session) []string {
669675}
670676
671677// findMostRecentTUISession finds the most recently updated tui session
678+ //
679+ //nolint:unused
672680func findMostRecentTUISession (mgr * session.Manager ) string {
673681 keys , err := mgr .List ()
674682 if err != nil {
@@ -762,6 +770,8 @@ func (ft *FailureTracker) GetFailedToolNames() []string {
762770}
763771
764772// formatToolError 格式化工具错误,提供替代建议
773+ //
774+ //nolint:unused
765775func formatToolError (toolName string , params map [string ]interface {}, err error , availableTools []string ) string {
766776 errorMsg := err .Error ()
767777
@@ -824,6 +834,8 @@ func formatToolError(toolName string, params map[string]interface{}, err error,
824834}
825835
826836// shouldUseErrorGuidance 判断是否需要添加错误处理指导
837+ //
838+ //nolint:unused
827839func shouldUseErrorGuidance (history []session.Message ) bool {
828840 // 检查最近的消息中是否有工具失败
829841 if len (history ) == 0 {
@@ -847,6 +859,8 @@ func shouldUseErrorGuidance(history []session.Message) bool {
847859}
848860
849861// getAvailableToolNames 获取可用的工具名称列表
862+ //
863+ //nolint:unused
850864func getAvailableToolNames (toolRegistry * tools.Registry ) []string {
851865 if toolRegistry == nil {
852866 return []string {}
0 commit comments