Files
repo-lens/src/repo_tool_map.cpp
T
wilmc a0fbb9f50e
CI / build (debug, map[compiler:appleclang os:macos-latest]) (push) Canceled after 0s
CI / build (debug, map[compiler:clang os:ubuntu-latest]) (push) Canceled after 0s
CI / build (debug, map[compiler:gcc os:ubuntu-latest]) (push) Canceled after 0s
CI / build (debug, map[compiler:msvc os:windows-latest]) (push) Canceled after 0s
CI / build (release, map[compiler:appleclang os:macos-latest]) (push) Canceled after 0s
CI / build (release, map[compiler:clang os:ubuntu-latest]) (push) Canceled after 0s
CI / build (release, map[compiler:gcc os:ubuntu-latest]) (push) Canceled after 0s
CI / build (release, map[compiler:msvc os:windows-latest]) (push) Canceled after 0s
CI / build (sanitizers, map[compiler:appleclang os:macos-latest]) (push) Canceled after 0s
CI / build (sanitizers, map[compiler:clang os:ubuntu-latest]) (push) Canceled after 0s
CI / build (sanitizers, map[compiler:gcc os:ubuntu-latest]) (push) Canceled after 0s
CI / build (sanitizers, map[compiler:msvc os:windows-latest]) (push) Canceled after 0s
Implement bounded repository navigation with repo-lens
- Add map, find, and around commands with repository root discovery
- Stream literal ripgrep searches with match counts and result limits
- Add direct subprocess execution and explicit error returns
- Disable C++ exceptions and add navigation tests
- Support CMake installation and document builds and deployment
- Add a reusable agent skill and document skill discovery
2026-10-09 13:15:00 +02:00

27 lines
607 B
C++

#include "navigation.hpp"
#include "repo_tool_map.hpp"
#include <iostream>
namespace rl
{
auto RepoLensToolMap::execute(arguments args) noexcept -> exit_code
{
if (args.size() != 1 || args[0].empty())
{
std::cerr << "map: Usage: repo map <term> (non-empty term)" << '\n';
return 2;
}
std::filesystem::path root;
std::string error;
std::vector<std::string> lines;
if (!repository_root(root, error) || !read_lines(root / "docs" / "PROJECTMAP.md", lines, error))
{
std::cerr << "map: " << error << '\n';
return 2;
}
std::cout << map_sections(lines, args[0]);
return 0;
}
} // namespace rl