feat(weknoracloud): implement credential management and status checks

- Introduced a new WeKnoraCloudSettings component for managing APPID and APPSECRET.
- Added functionality to save WeKnoraCloud credentials without automatically creating models.
- Implemented credential status checks across various components to provide user feedback on configuration status.
- Updated API endpoints to handle credential saving and status retrieval.
- Enhanced UI elements to guide users in configuring WeKnoraCloud settings.

This update improves the integration of WeKnoraCloud by allowing users to manage their credentials more effectively and receive real-time feedback on their configuration status.
This commit is contained in:
wizardchen
2026-04-14 17:13:16 +08:00
committed by lyingbug
parent 0ce9dc056a
commit 0eff63b308
26 changed files with 808 additions and 541 deletions
@@ -12,6 +12,7 @@ import (
"sync"
"time"
"github.com/Tencent/WeKnora/internal/logger"
"github.com/Tencent/WeKnora/internal/types"
)
@@ -73,7 +74,7 @@ func NewHTTPDocumentReader(baseURL string) (*HTTPDocumentReader, error) {
},
}
if p.baseURL != "" {
logger.Printf("INFO: HTTP docreader base URL: %s", p.baseURL)
logger.Infof(context.Background(), "INFO: HTTP docreader base URL: %s", p.baseURL)
}
return p, nil
}
@@ -88,7 +89,7 @@ func (p *HTTPDocumentReader) Reconnect(addr string) error {
p.mu.Lock()
defer p.mu.Unlock()
p.baseURL = strings.TrimSuffix(addr, "/")
logger.Printf("INFO: HTTP docreader base URL set to %s", p.baseURL)
logger.Infof(context.Background(), "INFO: HTTP docreader base URL set to %s", p.baseURL)
return nil
}