Refactor internal services to use agent-desk package structure
- Updated import paths in multiple service files to reflect the new agent-desk module. - Added a new configuration file for agent-desk in the Docker setup.
This commit is contained in:
+3
-3
@@ -27,7 +27,7 @@ ARG TARGETARCH
|
|||||||
RUN --mount=type=cache,target=/go/pkg/mod \
|
RUN --mount=type=cache,target=/go/pkg/mod \
|
||||||
--mount=type=cache,target=/root/.cache/go-build \
|
--mount=type=cache,target=/root/.cache/go-build \
|
||||||
CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
|
CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
|
||||||
go build -v -trimpath -ldflags="-s -w" -o /out/cs-ai-agent ./cmd/server
|
go build -v -trimpath -ldflags="-s -w" -o /out/agent-desk ./cmd/server
|
||||||
|
|
||||||
FROM alpine:3.22 AS app
|
FROM alpine:3.22 AS app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -37,7 +37,7 @@ ENV TZ=Asia/Shanghai
|
|||||||
RUN apk add --no-cache ca-certificates tzdata wget \
|
RUN apk add --no-cache ca-certificates tzdata wget \
|
||||||
&& mkdir -p /app/config /app/data/storage
|
&& mkdir -p /app/config /app/data/storage
|
||||||
|
|
||||||
COPY --from=server-builder /out/cs-ai-agent /app/cs-ai-agent
|
COPY --from=server-builder /out/agent-desk /app/agent-desk
|
||||||
COPY config/config.example.yaml /app/config/config.example.yaml
|
COPY config/config.example.yaml /app/config/config.example.yaml
|
||||||
COPY config/config.example.yaml /app/config/config.yaml
|
COPY config/config.example.yaml /app/config/config.yaml
|
||||||
|
|
||||||
@@ -47,4 +47,4 @@ VOLUME ["/app/data"]
|
|||||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
|
||||||
CMD wget -qO- http://127.0.0.1:8083/ >/dev/null || exit 1
|
CMD wget -qO- http://127.0.0.1:8083/ >/dev/null || exit 1
|
||||||
|
|
||||||
CMD ["/app/cs-ai-agent", "-config", "/app/config/config.yaml"]
|
CMD ["/app/agent-desk", "-config", "/app/config/config.yaml"]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP := cs-ai-agent
|
APP := agent-desk
|
||||||
MAIN := ./cmd/server
|
MAIN := ./cmd/server
|
||||||
WEB_DIR := web
|
WEB_DIR := web
|
||||||
SPA_INDEX := $(WEB_DIR)/out/index.html
|
SPA_INDEX := $(WEB_DIR)/out/index.html
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ package main
|
|||||||
import (
|
import (
|
||||||
"log/slog"
|
"log/slog"
|
||||||
|
|
||||||
"cs-ai-agent/internal/bootstrap"
|
"agent-desk/internal/bootstrap"
|
||||||
"cs-ai-agent/internal/pkg/config"
|
"agent-desk/internal/pkg/config"
|
||||||
"cs-ai-agent/internal/pkg/logx"
|
"agent-desk/internal/pkg/logx"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
+2
-2
@@ -4,8 +4,8 @@ import (
|
|||||||
"flag"
|
"flag"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
|
|
||||||
"cs-ai-agent/internal/bootstrap"
|
"agent-desk/internal/bootstrap"
|
||||||
"cs-ai-agent/internal/pkg/config"
|
"agent-desk/internal/pkg/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
Vendored
+4
-4
@@ -1,10 +1,10 @@
|
|||||||
package agentteam
|
package agentteam
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/constants"
|
"agent-desk/internal/pkg/constants"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/repositories"
|
"agent-desk/internal/repositories"
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|||||||
Vendored
+4
-4
@@ -6,10 +6,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/constants"
|
"agent-desk/internal/pkg/constants"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/repositories"
|
"agent-desk/internal/repositories"
|
||||||
|
|
||||||
"github.com/mlogclub/simple/sqls"
|
"github.com/mlogclub/simple/sqls"
|
||||||
"gopkg.in/yaml.v3"
|
"gopkg.in/yaml.v3"
|
||||||
|
|||||||
Vendored
+4
-4
@@ -1,10 +1,10 @@
|
|||||||
package channel
|
package channel
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/dto"
|
"agent-desk/internal/pkg/dto"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/repositories"
|
"agent-desk/internal/repositories"
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|||||||
Vendored
+4
-4
@@ -1,11 +1,11 @@
|
|||||||
package kb
|
package kb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"agent-desk/internal/models"
|
||||||
|
"agent-desk/internal/pkg/constants"
|
||||||
|
"agent-desk/internal/pkg/enums"
|
||||||
|
"agent-desk/internal/repositories"
|
||||||
"bytes"
|
"bytes"
|
||||||
"cs-ai-agent/internal/models"
|
|
||||||
"cs-ai-agent/internal/pkg/constants"
|
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
|
||||||
"cs-ai-agent/internal/repositories"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|||||||
Vendored
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
package quickreply
|
package quickreply
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/repositories"
|
"agent-desk/internal/repositories"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mlogclub/simple/sqls"
|
"github.com/mlogclub/simple/sqls"
|
||||||
|
|||||||
Vendored
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
package skill
|
package skill
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/repositories"
|
"agent-desk/internal/repositories"
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|||||||
Vendored
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
package tag
|
package tag
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/repositories"
|
"agent-desk/internal/repositories"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mlogclub/simple/sqls"
|
"github.com/mlogclub/simple/sqls"
|
||||||
|
|||||||
+4
-4
@@ -28,7 +28,7 @@ services:
|
|||||||
- "6333:6333"
|
- "6333:6333"
|
||||||
- "6334:6334"
|
- "6334:6334"
|
||||||
|
|
||||||
cs-ai-agent:
|
agent-desk:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
@@ -42,12 +42,12 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "8083:8083"
|
- "8083:8083"
|
||||||
volumes:
|
volumes:
|
||||||
- cs-ai-agent-data:/app/data
|
- agent-desk-data:/app/data
|
||||||
- ./docker/cs-ai-agent.yaml:/app/config/config.yaml:ro
|
- ./docker/agent-desk.yaml:/app/config/config.yaml:ro
|
||||||
environment:
|
environment:
|
||||||
TZ: Asia/Shanghai
|
TZ: Asia/Shanghai
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mysql-data:
|
mysql-data:
|
||||||
qdrant-data:
|
qdrant-data:
|
||||||
cs-ai-agent-data:
|
agent-desk-data:
|
||||||
|
|||||||
+1
-1
Submodule docs updated: f489d3cc39...3ed8829e4c
@@ -1,6 +1,6 @@
|
|||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
import "cs-ai-agent/internal/ai/runtime/registry"
|
import "agent-desk/internal/ai/runtime/registry"
|
||||||
|
|
||||||
func newPrepareService(catalog *toolCatalog) *prepareService {
|
func newPrepareService(catalog *toolCatalog) *prepareService {
|
||||||
return &prepareService{catalog: catalog}
|
return &prepareService{catalog: catalog}
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package runtime
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai/runtime/executor"
|
"agent-desk/internal/ai/runtime/executor"
|
||||||
"cs-ai-agent/internal/pkg/utils"
|
"agent-desk/internal/pkg/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Service struct {
|
type Service struct {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cs-ai-agent/internal/ai/runtime/executor"
|
"agent-desk/internal/ai/runtime/executor"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai/runtime/registry"
|
"agent-desk/internal/ai/runtime/registry"
|
||||||
"cs-ai-agent/internal/ai/runtime/tools"
|
"agent-desk/internal/ai/runtime/tools"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/toolx"
|
"agent-desk/internal/pkg/toolx"
|
||||||
)
|
)
|
||||||
|
|
||||||
type toolCatalog struct {
|
type toolCatalog struct {
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package runtime
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/toolx"
|
"agent-desk/internal/pkg/toolx"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestNormalizeAllowedToolCodes(t *testing.T) {
|
func TestNormalizeAllowedToolCodes(t *testing.T) {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cs-ai-agent/internal/ai/runtime/registry"
|
"agent-desk/internal/ai/runtime/registry"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Request struct {
|
type Request struct {
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
|
|
||||||
openai "github.com/openai/openai-go/v3"
|
openai "github.com/openai/openai-go/v3"
|
||||||
|
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/pkg/errorsx"
|
"agent-desk/internal/pkg/errorsx"
|
||||||
)
|
)
|
||||||
|
|
||||||
type EmbeddingResult struct {
|
type EmbeddingResult struct {
|
||||||
|
|||||||
+2
-2
@@ -10,8 +10,8 @@ import (
|
|||||||
openai "github.com/openai/openai-go/v3"
|
openai "github.com/openai/openai-go/v3"
|
||||||
"github.com/openai/openai-go/v3/shared"
|
"github.com/openai/openai-go/v3/shared"
|
||||||
|
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ChatCompletionResult struct {
|
type ChatCompletionResult struct {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package providers
|
package providers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"agent-desk/internal/pkg/config"
|
||||||
"context"
|
"context"
|
||||||
"cs-ai-agent/internal/pkg/config"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/modelcontextprotocol/go-sdk/mcp"
|
"github.com/modelcontextprotocol/go-sdk/mcp"
|
||||||
@@ -46,12 +46,12 @@ func (p *systemToolProvider) Register(server *mcp.Server) error {
|
|||||||
server,
|
server,
|
||||||
&mcp.Tool{
|
&mcp.Tool{
|
||||||
Name: "service_info",
|
Name: "service_info",
|
||||||
Description: "查看当前 cs-ai-agent 服务的基础运行信息。",
|
Description: "查看当前 agent-desk 服务的基础运行信息。",
|
||||||
},
|
},
|
||||||
func(ctx context.Context, req *mcp.CallToolRequest, _ struct{}) (*mcp.CallToolResult, map[string]any, error) {
|
func(ctx context.Context, req *mcp.CallToolRequest, _ struct{}) (*mcp.CallToolResult, map[string]any, error) {
|
||||||
cfg := config.Current()
|
cfg := config.Current()
|
||||||
return nil, map[string]any{
|
return nil, map[string]any{
|
||||||
"name": "cs-ai-agent",
|
"name": "agent-desk",
|
||||||
"version": "v1",
|
"version": "v1",
|
||||||
"mcpPath": "/api/mcp",
|
"mcpPath": "/api/mcp",
|
||||||
"port": cfg.Server.Port,
|
"port": cfg.Server.Port,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package mcps
|
package mcps
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cs-ai-agent/internal/ai/mcps/providers"
|
"agent-desk/internal/ai/mcps/providers"
|
||||||
|
|
||||||
"github.com/modelcontextprotocol/go-sdk/mcp"
|
"github.com/modelcontextprotocol/go-sdk/mcp"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"cs-ai-agent/internal/pkg/config"
|
"agent-desk/internal/pkg/config"
|
||||||
"cs-ai-agent/internal/pkg/errorsx"
|
"agent-desk/internal/pkg/errorsx"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RuntimeService struct {
|
type RuntimeService struct {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ func NewHTTPHandler() http.Handler {
|
|||||||
|
|
||||||
func newServer() *mcp.Server {
|
func newServer() *mcp.Server {
|
||||||
server := mcp.NewServer(&mcp.Implementation{
|
server := mcp.NewServer(&mcp.Implementation{
|
||||||
Name: "cs-ai-agent-mcp-server",
|
Name: "agent-desk-mcp-server",
|
||||||
Title: "CS Agent MCP Server",
|
Title: "CS Agent MCP Server",
|
||||||
Version: "v1",
|
Version: "v1",
|
||||||
WebsiteURL: "https://github.com/modelcontextprotocol",
|
WebsiteURL: "https://github.com/modelcontextprotocol",
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import (
|
|||||||
openai "github.com/openai/openai-go/v3"
|
openai "github.com/openai/openai-go/v3"
|
||||||
"github.com/openai/openai-go/v3/option"
|
"github.com/openai/openai-go/v3/option"
|
||||||
|
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/pkg/errorsx"
|
"agent-desk/internal/pkg/errorsx"
|
||||||
"cs-ai-agent/internal/repositories"
|
"agent-desk/internal/repositories"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newOpenAIClient(config models.AIConfig) openai.Client {
|
func newOpenAIClient(config models.AIConfig) openai.Client {
|
||||||
|
|||||||
@@ -8,14 +8,14 @@ import (
|
|||||||
|
|
||||||
"github.com/mlogclub/simple/sqls"
|
"github.com/mlogclub/simple/sqls"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai"
|
"agent-desk/internal/ai"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/dto"
|
"agent-desk/internal/pkg/dto"
|
||||||
"cs-ai-agent/internal/pkg/dto/request"
|
"agent-desk/internal/pkg/dto/request"
|
||||||
"cs-ai-agent/internal/pkg/dto/response"
|
"agent-desk/internal/pkg/dto/response"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/pkg/errorsx"
|
"agent-desk/internal/pkg/errorsx"
|
||||||
"cs-ai-agent/internal/repositories"
|
"agent-desk/internal/repositories"
|
||||||
)
|
)
|
||||||
|
|
||||||
type answer struct {
|
type answer struct {
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ package rag
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/dto/response"
|
"agent-desk/internal/pkg/dto/response"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBuildFallbackAnswer(t *testing.T) {
|
func TestBuildFallbackAnswer(t *testing.T) {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package chunk
|
package chunk
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"agent-desk/internal/pkg/enums"
|
||||||
"context"
|
"context"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type fixedProvider struct{}
|
type fixedProvider struct{}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package chunk
|
package chunk
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"agent-desk/internal/pkg/enums"
|
||||||
"context"
|
"context"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Provider interface {
|
type Provider interface {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package chunk
|
package chunk
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"agent-desk/internal/pkg/enums"
|
||||||
"context"
|
"context"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package chunk
|
package chunk
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"agent-desk/internal/pkg/enums"
|
||||||
"context"
|
"context"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/gomarkdown/markdown"
|
"github.com/gomarkdown/markdown"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package chunk
|
package chunk
|
||||||
|
|
||||||
import "cs-ai-agent/internal/pkg/enums"
|
import "agent-desk/internal/pkg/enums"
|
||||||
|
|
||||||
type ChunkRequest struct {
|
type ChunkRequest struct {
|
||||||
KnowledgeBaseID int64
|
KnowledgeBaseID int64
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package chunk
|
package chunk
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"agent-desk/internal/pkg/enums"
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"strings"
|
"strings"
|
||||||
"unicode"
|
"unicode"
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ import (
|
|||||||
"log/slog"
|
"log/slog"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai"
|
"agent-desk/internal/ai"
|
||||||
ragchunk "cs-ai-agent/internal/ai/rag/chunk"
|
ragchunk "agent-desk/internal/ai/rag/chunk"
|
||||||
"cs-ai-agent/internal/ai/rag/vectordb"
|
"agent-desk/internal/ai/rag/vectordb"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/repositories"
|
"agent-desk/internal/repositories"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/mlogclub/simple/sqls"
|
"github.com/mlogclub/simple/sqls"
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai/rag/vectordb"
|
"agent-desk/internal/ai/rag/vectordb"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
|
|
||||||
"github.com/mlogclub/simple/common/strs"
|
"github.com/mlogclub/simple/common/strs"
|
||||||
"github.com/mlogclub/simple/sqls"
|
"github.com/mlogclub/simple/sqls"
|
||||||
|
|||||||
@@ -6,12 +6,13 @@ import (
|
|||||||
"log/slog"
|
"log/slog"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
ragchunk "cs-ai-agent/internal/ai/rag/chunk"
|
ragchunk "agent-desk/internal/ai/rag/chunk"
|
||||||
"cs-ai-agent/internal/ai/rag/vectordb"
|
"agent-desk/internal/ai/rag/vectordb"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
|
|
||||||
|
"agent-desk/internal/ai"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai"
|
|
||||||
"github.com/mlogclub/simple/common/strs"
|
"github.com/mlogclub/simple/common/strs"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai"
|
"agent-desk/internal/ai"
|
||||||
"cs-ai-agent/internal/ai/rag/vectordb"
|
"agent-desk/internal/ai/rag/vectordb"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
)
|
)
|
||||||
|
|
||||||
func buildFAQChunkModel(knowledgeBase models.KnowledgeBase, faq models.KnowledgeFAQ, content string) (models.KnowledgeChunk, string) {
|
func buildFAQChunkModel(knowledgeBase models.KnowledgeBase, faq models.KnowledgeFAQ, content string) (models.KnowledgeChunk, string) {
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ package rag
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/repositories"
|
"agent-desk/internal/repositories"
|
||||||
|
|
||||||
"github.com/mlogclub/simple/sqls"
|
"github.com/mlogclub/simple/sqls"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBuildFAQChunkContent(t *testing.T) {
|
func TestBuildFAQChunkContent(t *testing.T) {
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai"
|
"agent-desk/internal/ai"
|
||||||
"cs-ai-agent/internal/ai/rag/vectordb"
|
"agent-desk/internal/ai/rag/vectordb"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/repositories"
|
"agent-desk/internal/repositories"
|
||||||
|
|
||||||
"github.com/mlogclub/simple/common/strs"
|
"github.com/mlogclub/simple/common/strs"
|
||||||
"github.com/mlogclub/simple/sqls"
|
"github.com/mlogclub/simple/sqls"
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ package rag
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/repositories"
|
"agent-desk/internal/repositories"
|
||||||
|
|
||||||
"github.com/mlogclub/simple/sqls"
|
"github.com/mlogclub/simple/sqls"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai/rag/vectordb"
|
"agent-desk/internal/ai/rag/vectordb"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
|
|
||||||
"github.com/mlogclub/simple/sqls"
|
"github.com/mlogclub/simple/sqls"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai"
|
"agent-desk/internal/ai"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
)
|
)
|
||||||
|
|
||||||
type rerank struct{}
|
type rerank struct{}
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ import (
|
|||||||
"log/slog"
|
"log/slog"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai/rag/vectordb"
|
"agent-desk/internal/ai/rag/vectordb"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/repositories"
|
"agent-desk/internal/repositories"
|
||||||
|
|
||||||
"github.com/mlogclub/simple/sqls"
|
"github.com/mlogclub/simple/sqls"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
|
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newRetrieveTrace() *RetrieveTrace {
|
func newRetrieveTrace() *RetrieveTrace {
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/dto"
|
"agent-desk/internal/pkg/dto"
|
||||||
"cs-ai-agent/internal/pkg/dto/response"
|
"agent-desk/internal/pkg/dto/response"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/mlogclub/simple/sqls"
|
"github.com/mlogclub/simple/sqls"
|
||||||
|
|||||||
@@ -8,11 +8,11 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai"
|
"agent-desk/internal/ai"
|
||||||
"cs-ai-agent/internal/ai/rag/vectordb"
|
"agent-desk/internal/ai/rag/vectordb"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/repositories"
|
"agent-desk/internal/repositories"
|
||||||
|
|
||||||
"github.com/mlogclub/simple/sqls"
|
"github.com/mlogclub/simple/sqls"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package rag
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestResolveKnowledgeBaseSearchOptionsUsesKnowledgeBaseDefaults(t *testing.T) {
|
func TestResolveKnowledgeBaseSearchOptionsUsesKnowledgeBaseDefaults(t *testing.T) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package rag
|
package rag
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/yuin/goldmark"
|
"github.com/yuin/goldmark"
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package rag
|
package rag
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cs-ai-agent/internal/ai/rag/vectordb"
|
"agent-desk/internal/ai/rag/vectordb"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"cs-ai-agent/internal/pkg/config"
|
"agent-desk/internal/pkg/config"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
)
|
)
|
||||||
|
|
||||||
var defaultProvider Provider
|
var defaultProvider Provider
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/qdrant/go-client/qdrant"
|
"github.com/qdrant/go-client/qdrant"
|
||||||
|
|
||||||
"cs-ai-agent/internal/pkg/config"
|
"agent-desk/internal/pkg/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Vector struct {
|
type Vector struct {
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
applicationruntime "cs-ai-agent/internal/ai/application/runtime"
|
applicationruntime "agent-desk/internal/ai/application/runtime"
|
||||||
"cs-ai-agent/internal/ai/runtime/graphs"
|
"agent-desk/internal/ai/runtime/graphs"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/dto/request"
|
"agent-desk/internal/pkg/dto/request"
|
||||||
"cs-ai-agent/internal/pkg/dto/response"
|
"agent-desk/internal/pkg/dto/response"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/pkg/errorsx"
|
"agent-desk/internal/pkg/errorsx"
|
||||||
svc "cs-ai-agent/internal/services"
|
svc "agent-desk/internal/services"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai/runtime/internal/impl/callbacks"
|
"agent-desk/internal/ai/runtime/internal/impl/callbacks"
|
||||||
"cs-ai-agent/internal/ai/runtime/internal/impl/retrievers"
|
"agent-desk/internal/ai/runtime/internal/impl/retrievers"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/utils"
|
"agent-desk/internal/pkg/utils"
|
||||||
|
|
||||||
"github.com/cloudwego/eino/compose"
|
"github.com/cloudwego/eino/compose"
|
||||||
"github.com/cloudwego/eino/schema"
|
"github.com/cloudwego/eino/schema"
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai/rag"
|
"agent-desk/internal/ai/rag"
|
||||||
"cs-ai-agent/internal/ai/runtime/internal/impl/callbacks"
|
"agent-desk/internal/ai/runtime/internal/impl/callbacks"
|
||||||
"cs-ai-agent/internal/ai/runtime/internal/impl/retrievers"
|
"agent-desk/internal/ai/runtime/internal/impl/retrievers"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
|
|
||||||
"github.com/cloudwego/eino/schema"
|
"github.com/cloudwego/eino/schema"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai/runtime/internal/impl/adapter"
|
"agent-desk/internal/ai/runtime/internal/impl/adapter"
|
||||||
"cs-ai-agent/internal/ai/runtime/internal/impl/callbacks"
|
"agent-desk/internal/ai/runtime/internal/impl/callbacks"
|
||||||
"cs-ai-agent/internal/pkg/utils"
|
"agent-desk/internal/pkg/utils"
|
||||||
|
|
||||||
"github.com/cloudwego/eino/schema"
|
"github.com/cloudwego/eino/schema"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ package executor
|
|||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai/runtime/internal/impl/callbacks"
|
"agent-desk/internal/ai/runtime/internal/impl/callbacks"
|
||||||
"cs-ai-agent/internal/ai/runtime/tooling"
|
"agent-desk/internal/ai/runtime/tooling"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/pkg/toolx"
|
"agent-desk/internal/pkg/toolx"
|
||||||
|
|
||||||
"github.com/cloudwego/eino/adk"
|
"github.com/cloudwego/eino/adk"
|
||||||
"github.com/cloudwego/eino/schema"
|
"github.com/cloudwego/eino/schema"
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai/runtime/tooling"
|
"agent-desk/internal/ai/runtime/tooling"
|
||||||
"cs-ai-agent/internal/pkg/toolx"
|
"agent-desk/internal/pkg/toolx"
|
||||||
|
|
||||||
"github.com/cloudwego/eino/adk"
|
"github.com/cloudwego/eino/adk"
|
||||||
"github.com/cloudwego/eino/schema"
|
"github.com/cloudwego/eino/schema"
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ package executor
|
|||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai/runtime/internal/impl/retrievers"
|
"agent-desk/internal/ai/runtime/internal/impl/retrievers"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
|
|
||||||
"github.com/cloudwego/eino/schema"
|
"github.com/cloudwego/eino/schema"
|
||||||
"github.com/mlogclub/simple/common/strs"
|
"github.com/mlogclub/simple/common/strs"
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai/runtime/internal/impl/callbacks"
|
"agent-desk/internal/ai/runtime/internal/impl/callbacks"
|
||||||
"cs-ai-agent/internal/ai/runtime/internal/impl/factory"
|
"agent-desk/internal/ai/runtime/internal/impl/factory"
|
||||||
|
|
||||||
"github.com/cloudwego/eino/adk"
|
"github.com/cloudwego/eino/adk"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai/runtime/registry"
|
"agent-desk/internal/ai/runtime/registry"
|
||||||
runtimetooling "cs-ai-agent/internal/ai/runtime/tooling"
|
runtimetooling "agent-desk/internal/ai/runtime/tooling"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/toolx"
|
"agent-desk/internal/pkg/toolx"
|
||||||
|
|
||||||
einotool "github.com/cloudwego/eino/components/tool"
|
einotool "github.com/cloudwego/eino/components/tool"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package executor
|
package executor
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cs-ai-agent/internal/ai/runtime/registry"
|
"agent-desk/internal/ai/runtime/registry"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RunInput struct {
|
type RunInput struct {
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/services"
|
"agent-desk/internal/services"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AnalyzeConversationInput struct {
|
type AnalyzeConversationInput struct {
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package graphs
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBuildAnalyzeConversationResult_RecommendsHandoffForComplaint(t *testing.T) {
|
func TestBuildAnalyzeConversationResult_RecommendsHandoffForComplaint(t *testing.T) {
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai/runtime/tooling"
|
"agent-desk/internal/ai/runtime/tooling"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/dto"
|
"agent-desk/internal/pkg/dto"
|
||||||
"cs-ai-agent/internal/pkg/dto/request"
|
"agent-desk/internal/pkg/dto/request"
|
||||||
"cs-ai-agent/internal/services"
|
"agent-desk/internal/services"
|
||||||
|
|
||||||
componenttool "github.com/cloudwego/eino/components/tool"
|
componenttool "github.com/cloudwego/eino/components/tool"
|
||||||
"github.com/cloudwego/eino/schema"
|
"github.com/cloudwego/eino/schema"
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai/runtime/tooling"
|
"agent-desk/internal/ai/runtime/tooling"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/tracex"
|
"agent-desk/internal/pkg/tracex"
|
||||||
"cs-ai-agent/internal/services"
|
"agent-desk/internal/services"
|
||||||
|
|
||||||
componenttool "github.com/cloudwego/eino/components/tool"
|
componenttool "github.com/cloudwego/eino/components/tool"
|
||||||
"github.com/cloudwego/eino/schema"
|
"github.com/cloudwego/eino/schema"
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai/runtime/tooling"
|
"agent-desk/internal/ai/runtime/tooling"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/services"
|
"agent-desk/internal/services"
|
||||||
|
|
||||||
"github.com/glebarez/sqlite"
|
"github.com/glebarez/sqlite"
|
||||||
"github.com/mlogclub/simple/sqls"
|
"github.com/mlogclub/simple/sqls"
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/services"
|
"agent-desk/internal/services"
|
||||||
)
|
)
|
||||||
|
|
||||||
type PrepareTicketDraftInput struct {
|
type PrepareTicketDraftInput struct {
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package graphs
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBuildPrepareTicketDraftResult_UsesConversationFallbacks(t *testing.T) {
|
func TestBuildPrepareTicketDraftResult_UsesConversationFallbacks(t *testing.T) {
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/services"
|
"agent-desk/internal/services"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TriageServiceRequestInput struct {
|
type TriageServiceRequestInput struct {
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package graphs
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestTriageServiceRequestResult_PrepareTicket(t *testing.T) {
|
func TestTriageServiceRequestResult_PrepareTicket(t *testing.T) {
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
runtimetooling "cs-ai-agent/internal/ai/runtime/tooling"
|
runtimetooling "agent-desk/internal/ai/runtime/tooling"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/toolx"
|
"agent-desk/internal/pkg/toolx"
|
||||||
)
|
)
|
||||||
|
|
||||||
func BuildSelectedSkillActivationInstruction(skill *models.SkillDefinition) string {
|
func BuildSelectedSkillActivationInstruction(skill *models.SkillDefinition) string {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package instruction
|
package instruction
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cs-ai-agent/internal/ai/runtime/tooling"
|
"agent-desk/internal/ai/runtime/tooling"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/toolx"
|
"agent-desk/internal/pkg/toolx"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ToolAppendixProvider struct{}
|
type ToolAppendixProvider struct{}
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package instruction
|
|||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
runtimetooling "cs-ai-agent/internal/ai/runtime/tooling"
|
runtimetooling "agent-desk/internal/ai/runtime/tooling"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Service struct {
|
type Service struct {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package adapter
|
package adapter
|
||||||
|
|
||||||
import "cs-ai-agent/internal/models"
|
import "agent-desk/internal/models"
|
||||||
|
|
||||||
type AIConfigSnapshot struct {
|
type AIConfigSnapshot struct {
|
||||||
ID int64
|
ID int64
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package adapter
|
package adapter
|
||||||
|
|
||||||
import "cs-ai-agent/internal/models"
|
import "agent-desk/internal/models"
|
||||||
|
|
||||||
type ConversationSnapshot struct {
|
type ConversationSnapshot struct {
|
||||||
ID int64
|
ID int64
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai/mcps"
|
"agent-desk/internal/ai/mcps"
|
||||||
"cs-ai-agent/internal/ai/runtime/tooling"
|
"agent-desk/internal/ai/runtime/tooling"
|
||||||
|
|
||||||
"github.com/eino-contrib/jsonschema"
|
"github.com/eino-contrib/jsonschema"
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package adapter
|
package adapter
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/pkg/utils"
|
"agent-desk/internal/pkg/utils"
|
||||||
"cs-ai-agent/internal/repositories"
|
"agent-desk/internal/repositories"
|
||||||
|
|
||||||
"github.com/cloudwego/eino/schema"
|
"github.com/cloudwego/eino/schema"
|
||||||
"github.com/mlogclub/simple/sqls"
|
"github.com/mlogclub/simple/sqls"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai/mcps"
|
"agent-desk/internal/ai/mcps"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
impladapter "cs-ai-agent/internal/ai/runtime/internal/impl/adapter"
|
impladapter "agent-desk/internal/ai/runtime/internal/impl/adapter"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/pkg/toolx"
|
"agent-desk/internal/pkg/toolx"
|
||||||
|
|
||||||
einotool "github.com/cloudwego/eino/components/tool"
|
einotool "github.com/cloudwego/eino/components/tool"
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package callbacks
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"cs-ai-agent/internal/pkg/toolx"
|
"agent-desk/internal/pkg/toolx"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestParseGraphToolOutcome(t *testing.T) {
|
func TestParseGraphToolOutcome(t *testing.T) {
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai/runtime/instruction"
|
"agent-desk/internal/ai/runtime/instruction"
|
||||||
"cs-ai-agent/internal/ai/runtime/internal/impl/agents"
|
"agent-desk/internal/ai/runtime/internal/impl/agents"
|
||||||
"cs-ai-agent/internal/ai/runtime/internal/impl/callbacks"
|
"agent-desk/internal/ai/runtime/internal/impl/callbacks"
|
||||||
"cs-ai-agent/internal/ai/runtime/registry"
|
"agent-desk/internal/ai/runtime/registry"
|
||||||
"cs-ai-agent/internal/ai/runtime/tooling"
|
"agent-desk/internal/ai/runtime/tooling"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
|
|
||||||
"github.com/cloudwego/eino/adk"
|
"github.com/cloudwego/eino/adk"
|
||||||
"github.com/cloudwego/eino/components/tool"
|
"github.com/cloudwego/eino/components/tool"
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
einocallbacks "cs-ai-agent/internal/ai/runtime/internal/impl/callbacks"
|
einocallbacks "agent-desk/internal/ai/runtime/internal/impl/callbacks"
|
||||||
"cs-ai-agent/internal/ai/runtime/registry"
|
"agent-desk/internal/ai/runtime/registry"
|
||||||
runtimetooling "cs-ai-agent/internal/ai/runtime/tooling"
|
runtimetooling "agent-desk/internal/ai/runtime/tooling"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/toolx"
|
"agent-desk/internal/pkg/toolx"
|
||||||
|
|
||||||
"github.com/cloudwego/eino/adk"
|
"github.com/cloudwego/eino/adk"
|
||||||
einotoolsearch "github.com/cloudwego/eino/adk/middlewares/dynamictool/toolsearch"
|
einotoolsearch "github.com/cloudwego/eino/adk/middlewares/dynamictool/toolsearch"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
einocallbacks "cs-ai-agent/internal/ai/runtime/internal/impl/callbacks"
|
einocallbacks "agent-desk/internal/ai/runtime/internal/impl/callbacks"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAgentHandlerServiceBuildWithCollectorOnly(t *testing.T) {
|
func TestAgentHandlerServiceBuildWithCollectorOnly(t *testing.T) {
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
|
|
||||||
openai "github.com/cloudwego/eino-ext/components/model/openai"
|
openai "github.com/cloudwego/eino-ext/components/model/openai"
|
||||||
"github.com/cloudwego/eino/components/model"
|
"github.com/cloudwego/eino/components/model"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package factory
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
einostore "cs-ai-agent/internal/ai/runtime/internal/impl/store"
|
einostore "agent-desk/internal/ai/runtime/internal/impl/store"
|
||||||
|
|
||||||
"github.com/cloudwego/eino/adk"
|
"github.com/cloudwego/eino/adk"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,12 +6,12 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
runtimeinstruction "cs-ai-agent/internal/ai/runtime/instruction"
|
runtimeinstruction "agent-desk/internal/ai/runtime/instruction"
|
||||||
runtimetooling "cs-ai-agent/internal/ai/runtime/tooling"
|
runtimetooling "agent-desk/internal/ai/runtime/tooling"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/pkg/utils"
|
"agent-desk/internal/pkg/utils"
|
||||||
"cs-ai-agent/internal/services"
|
"agent-desk/internal/services"
|
||||||
|
|
||||||
einoskill "github.com/cloudwego/eino/adk/middlewares/skill"
|
einoskill "github.com/cloudwego/eino/adk/middlewares/skill"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
runtimetooling "cs-ai-agent/internal/ai/runtime/tooling"
|
runtimetooling "agent-desk/internal/ai/runtime/tooling"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
|
|
||||||
"github.com/glebarez/sqlite"
|
"github.com/glebarez/sqlite"
|
||||||
"github.com/mlogclub/simple/sqls"
|
"github.com/mlogclub/simple/sqls"
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ package factory
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
runtimetooling "cs-ai-agent/internal/ai/runtime/tooling"
|
runtimetooling "agent-desk/internal/ai/runtime/tooling"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/toolx"
|
"agent-desk/internal/pkg/toolx"
|
||||||
|
|
||||||
"github.com/cloudwego/eino/adk"
|
"github.com/cloudwego/eino/adk"
|
||||||
einoskill "github.com/cloudwego/eino/adk/middlewares/skill"
|
einoskill "github.com/cloudwego/eino/adk/middlewares/skill"
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai/mcps"
|
"agent-desk/internal/ai/mcps"
|
||||||
impladapter "cs-ai-agent/internal/ai/runtime/internal/impl/adapter"
|
impladapter "agent-desk/internal/ai/runtime/internal/impl/adapter"
|
||||||
runtimetooling "cs-ai-agent/internal/ai/runtime/tooling"
|
runtimetooling "agent-desk/internal/ai/runtime/tooling"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/pkg/toolx"
|
"agent-desk/internal/pkg/toolx"
|
||||||
|
|
||||||
einotool "github.com/cloudwego/eino/components/tool"
|
einotool "github.com/cloudwego/eino/components/tool"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package factory
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBuildMCPToolsSkipsGraphAndBuiltinTools(t *testing.T) {
|
func TestBuildMCPToolsSkipsGraphAndBuiltinTools(t *testing.T) {
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
einocallbacks "cs-ai-agent/internal/ai/runtime/internal/impl/callbacks"
|
einocallbacks "agent-desk/internal/ai/runtime/internal/impl/callbacks"
|
||||||
"cs-ai-agent/internal/pkg/toolx"
|
"agent-desk/internal/pkg/toolx"
|
||||||
|
|
||||||
"github.com/cloudwego/eino/adk"
|
"github.com/cloudwego/eino/adk"
|
||||||
"github.com/cloudwego/eino/components/model"
|
"github.com/cloudwego/eino/components/model"
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package factory
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
einocallbacks "cs-ai-agent/internal/ai/runtime/internal/impl/callbacks"
|
einocallbacks "agent-desk/internal/ai/runtime/internal/impl/callbacks"
|
||||||
"cs-ai-agent/internal/pkg/toolx"
|
"agent-desk/internal/pkg/toolx"
|
||||||
|
|
||||||
"github.com/cloudwego/eino/schema"
|
"github.com/cloudwego/eino/schema"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ package factory
|
|||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
runtimeinstruction "cs-ai-agent/internal/ai/runtime/instruction"
|
runtimeinstruction "agent-desk/internal/ai/runtime/instruction"
|
||||||
einocallbacks "cs-ai-agent/internal/ai/runtime/internal/impl/callbacks"
|
einocallbacks "agent-desk/internal/ai/runtime/internal/impl/callbacks"
|
||||||
"cs-ai-agent/internal/ai/runtime/registry"
|
"agent-desk/internal/ai/runtime/registry"
|
||||||
runtimetooling "cs-ai-agent/internal/ai/runtime/tooling"
|
runtimetooling "agent-desk/internal/ai/runtime/tooling"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/pkg/toolx"
|
"agent-desk/internal/pkg/toolx"
|
||||||
)
|
)
|
||||||
|
|
||||||
func buildInstructionTraceSummary(summary runtimeinstruction.AssemblySummary) einocallbacks.InstructionTraceSummary {
|
func buildInstructionTraceSummary(summary runtimeinstruction.AssemblySummary) einocallbacks.InstructionTraceSummary {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package factory
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
runtimeinstruction "cs-ai-agent/internal/ai/runtime/instruction"
|
runtimeinstruction "agent-desk/internal/ai/runtime/instruction"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBuildInstructionTraceSummary(t *testing.T) {
|
func TestBuildInstructionTraceSummary(t *testing.T) {
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"cs-ai-agent/internal/ai/rag"
|
"agent-desk/internal/ai/rag"
|
||||||
"cs-ai-agent/internal/ai/runtime/internal/impl/callbacks"
|
"agent-desk/internal/ai/runtime/internal/impl/callbacks"
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/pkg/enums"
|
"agent-desk/internal/pkg/enums"
|
||||||
"cs-ai-agent/internal/pkg/utils"
|
"agent-desk/internal/pkg/utils"
|
||||||
"cs-ai-agent/internal/repositories"
|
"agent-desk/internal/repositories"
|
||||||
|
|
||||||
"github.com/mlogclub/simple/sqls"
|
"github.com/mlogclub/simple/sqls"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"cs-ai-agent/internal/models"
|
"agent-desk/internal/models"
|
||||||
"cs-ai-agent/internal/repositories"
|
"agent-desk/internal/repositories"
|
||||||
|
|
||||||
"github.com/cloudwego/eino/adk"
|
"github.com/cloudwego/eino/adk"
|
||||||
"github.com/mlogclub/simple/sqls"
|
"github.com/mlogclub/simple/sqls"
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user