File tree Expand file tree Collapse file tree 11 files changed +724
-641
lines changed
tests/analysis_tests/tests/src Expand file tree Collapse file tree 11 files changed +724
-641
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,12 @@ let main () =
117117 Mcp.IdentifierInfo. identifierInfo ~identifier ~path ~maybe_line: None
118118 ~maybe_col: None
119119 |> print_endline
120+ | [_; " mcp" ; " docs" ; called_from; typ; identifier] -> (
121+ match Mcp.Docs. docs_type_from_string typ with
122+ | None ->
123+ print_endline
124+ " Not a valid type. Should be either 'ProjectFile' or 'Library'."
125+ | Some typ -> Mcp.Docs. docs ~called_from ~typ ~identifier |> print_endline)
120126 | [_; " cache-project" ; rootPath] -> (
121127 Cfg. readProjectConfigCache := false ;
122128 let uri = Uri. fromPath rootPath in
Original file line number Diff line number Diff line change @@ -450,6 +450,18 @@ let test ~path =
450450 ~maybe_col: None
451451 |> print_endline;
452452 Sys. remove currentFile
453+ | "mdp" ->
454+ print_endline " MCP docs for project file" ;
455+ let identifier = String. sub rest 3 (String. length rest - 3 ) in
456+ let identifier = String. trim identifier in
457+ Mcp.Docs. docs ~called_from: path ~typ: ProjectFile ~identifier
458+ |> print_endline
459+ | "mdl" ->
460+ print_endline " MCP docs for library" ;
461+ let identifier = String. sub rest 3 (String. length rest - 3 ) in
462+ let identifier = String. trim identifier in
463+ Mcp.Docs. docs ~called_from: path ~typ: Library ~identifier
464+ |> print_endline
453465 | "xfm" ->
454466 let currentFile = createCurrentFile () in
455467 (* +2 is to ensure that the character ^ points to is what's considered the end of the selection. *)
You can’t perform that action at this time.
0 commit comments