Skip to content

Commit

Permalink
Fix: fix deletion file for .know ignore file (#314)
Browse files Browse the repository at this point in the history
Signed-off-by: Daishan Peng <[email protected]>
  • Loading branch information
StrongMonkey authored Oct 24, 2024
1 parent 21f853d commit ed59e2a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/controller/handlers/knowledge/knowledge.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,10 @@ func (a *Handler) IngestKnowledge(req router.Request, resp router.Response) erro
return fmt.Errorf("failed to create knowledge metadata file: %w", err)
}
} else {
var notFoundErr *gptscript.NotFoundInWorkspaceError
if err := a.gptscript.DeleteFileInWorkspace(req.Ctx, ".knowignore", gptscript.DeleteFileInWorkspaceOptions{
WorkspaceID: ws.Status.WorkspaceID,
}); err != nil {
}); err != nil && !errors.As(err, &notFoundErr) {
return fmt.Errorf("failed to delete ignore file: %w", err)
}
}
Expand Down

0 comments on commit ed59e2a

Please sign in to comment.