MCPcopy Index your code
hub / github.com/coder/coder / resolvePlanTurnPath

Function resolvePlanTurnPath

coderd/x/chatd/chattool/planpath.go:56–74  ·  view source on GitHub ↗
(
	ctx context.Context,
	resolvePlanPath func(context.Context) (chatPath string, home string, err error),
)

Source from the content-addressed store, hash-verified

54}
55
56func resolvePlanTurnPath(
57 ctx context.Context,
58 resolvePlanPath func(context.Context) (chatPath string, home string, err error),
59) (string, error) {
60 if resolvePlanPath == nil {
61 return "", xerrors.New("chat-specific plan path resolver is not configured")
62 }
63
64 planPath, _, err := resolvePlanPath(ctx)
65 if err != nil {
66 return "", xerrors.Errorf("resolve chat-specific plan path: %w", err)
67 }
68 planPath = strings.TrimSpace(planPath)
69 if planPath == "" {
70 return "", xerrors.New("chat-specific plan path is empty")
71 }
72
73 return planPath, nil
74}
75
76// chatd consumes agent-normalized POSIX paths. Workspace agents are
77// expected to convert separators to forward slashes before these

Callers 3

EditFilesFunction · 0.85
WriteFileFunction · 0.85
ProposePlanFunction · 0.85

Calls 2

NewMethod · 0.65
ErrorfMethod · 0.45

Tested by

no test coverage detected