Skip to content

Commit e3d823d

Browse files
authored
fix: getFileStruct null pointer exception (#130)
1 parent d7d2e54 commit e3d823d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llm/tool/ast_read.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,9 @@ func (t *ASTReadTools) GetFileStructure(_ context.Context, req GetFileStructReq)
398398
log.Debug("get file structure, req: %v", abutil.MarshalJSONIndentNoError(req))
399399
resp, err := t.getFileStructure(context.Background(), req, true)
400400
if err != nil {
401-
resp.Error = err.Error()
401+
return &GetFileStructResp{
402+
Error: err.Error(),
403+
}, nil
402404
}
403405
log.Debug("get repo structure, resp: %v", abutil.MarshalJSONIndentNoError(resp))
404406
return resp, nil

0 commit comments

Comments
 (0)