Add @ context references for files, folders, diffs, git, and URLs#2090
Closed
kshitijk4poor wants to merge 6 commits into
Closed
Add @ context references for files, folders, diffs, git, and URLs#2090kshitijk4poor wants to merge 6 commits into
kshitijk4poor wants to merge 6 commits into
Conversation
teknium1
added a commit
that referenced
this pull request
Mar 21, 2026
…injection Add @file:path, @folder:dir, @diff, @StaGeD, @git:N, and @url: references that expand inline before the message reaches the LLM. Supports line ranges (@file:main.py:10-50), token budget enforcement (soft warn at 25%, hard block at 50%), and path sandboxing for gateway. Core module from PR #2090 by @kshitijk4poor. CLI and gateway wiring rewritten against current main. Fixed asyncio.run() crash when called from inside a running event loop (gateway). Closes #682.
Contributor
|
Merged via PR #2343. Core module cherry-picked with authorship preserved. CLI/gateway wiring rewritten against current main, asyncio.run() crash fixed for gateway context. Thanks for the solid implementation! |
outsourc-e
pushed a commit
to outsourc-e/hermes-agent
that referenced
this pull request
Mar 26, 2026
…injection Add @file:path, @folder:dir, @diff, @StaGeD, @git:N, and @url: references that expand inline before the message reaches the LLM. Supports line ranges (@file:main.py:10-50), token budget enforcement (soft warn at 25%, hard block at 50%), and path sandboxing for gateway. Core module from PR NousResearch#2090 by @kshitijk4poor. CLI and gateway wiring rewritten against current main. Fixed asyncio.run() crash when called from inside a running event loop (gateway). Closes NousResearch#682.
angelburgosrosado
pushed a commit
to angelburgosrosado/hermes-agent
that referenced
this pull request
Apr 27, 2026
…injection Add @file:path, @folder:dir, @diff, @StaGeD, @git:N, and @url: references that expand inline before the message reaches the LLM. Supports line ranges (@file:main.py:10-50), token budget enforcement (soft warn at 25%, hard block at 50%), and path sandboxing for gateway. Core module from PR NousResearch#2090 by @kshitijk4poor. CLI and gateway wiring rewritten against current main. Fixed asyncio.run() crash when called from inside a running event loop (gateway). Closes NousResearch#682.
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
…injection Add @file:path, @folder:dir, @diff, @StaGeD, @git:N, and @url: references that expand inline before the message reaches the LLM. Supports line ranges (@file:main.py:10-50), token budget enforcement (soft warn at 25%, hard block at 50%), and path sandboxing for gateway. Core module from PR NousResearch#2090 by @kshitijk4poor. CLI and gateway wiring rewritten against current main. Fixed asyncio.run() crash when called from inside a running event loop (gateway). Closes NousResearch#682.
olympus-terminal
pushed a commit
to olympus-terminal/hermes-agent
that referenced
this pull request
May 16, 2026
…injection Add @file:path, @folder:dir, @diff, @StaGeD, @git:N, and @url: references that expand inline before the message reaches the LLM. Supports line ranges (@file:main.py:10-50), token budget enforcement (soft warn at 25%, hard block at 50%), and path sandboxing for gateway. Core module from PR NousResearch#2090 by @kshitijk4poor. CLI and gateway wiring rewritten against current main. Fixed asyncio.run() crash when called from inside a running event loop (gateway). Closes NousResearch#682.
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…injection Add @file:path, @folder:dir, @diff, @StaGeD, @git:N, and @url: references that expand inline before the message reaches the LLM. Supports line ranges (@file:main.py:10-50), token budget enforcement (soft warn at 25%, hard block at 50%), and path sandboxing for gateway. Core module from PR NousResearch#2090 by @kshitijk4poor. CLI and gateway wiring rewritten against current main. Fixed asyncio.run() crash when called from inside a running event loop (gateway). Closes NousResearch#682.
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
…injection Add @file:path, @folder:dir, @diff, @StaGeD, @git:N, and @url: references that expand inline before the message reaches the LLM. Supports line ranges (@file:main.py:10-50), token budget enforcement (soft warn at 25%, hard block at 50%), and path sandboxing for gateway. Core module from PR NousResearch#2090 by @kshitijk4poor. CLI and gateway wiring rewritten against current main. Fixed asyncio.run() crash when called from inside a running event loop (gateway). Closes NousResearch#682.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@context reference parser/expander for@file, ranged@file,@folder,@diff,@staged,@git:N, and@url@file:and@folder:and document the new feature in the user guideCloses #682.
Testing
source .venv/bin/activate && python -m pytest -o addopts='' tests/test_context_references.py tests/hermes_cli/test_commands.py tests/test_cli_context_references.py tests/gateway/test_context_references.py -qsource .venv/bin/activate && python -m pytest -o addopts='' tests/ -q(fails in this environment on unrelated existing tests outside this change set:tests/hermes_cli/test_gateway_service.py::TestEnsureUserSystemdEnv::test_sets_xdg_runtime_dir_when_missing,tests/integration/test_ha_integration.py::TestGatewayWebSocket::test_event_received_and_forwarded,tests/tools/test_delegate.py::TestDelegationCredentialResolution::test_direct_endpoint_does_not_fall_back_to_openrouter_api_key_env,tests/tools/test_transcription.py::TestGetProvider::test_explicit_openai_no_key_returns_none,tests/tools/test_transcription.py::TestTranscribeOpenAI::test_no_key, and threetests/tools/test_web_tools_config.py::TestParallelClientConfig::*cases becauseparallelis not installed.)