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 () =
117
117
Mcp.IdentifierInfo. identifierInfo ~identifier ~path ~maybe_line: None
118
118
~maybe_col: None
119
119
|> 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)
120
126
| [_; " cache-project" ; rootPath] -> (
121
127
Cfg. readProjectConfigCache := false ;
122
128
let uri = Uri. fromPath rootPath in
Original file line number Diff line number Diff line change @@ -450,6 +450,18 @@ let test ~path =
450
450
~maybe_col: None
451
451
|> print_endline;
452
452
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
453
465
| "xfm" ->
454
466
let currentFile = createCurrentFile () in
455
467
(* +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