feat(trellis): enhance bundled skills and workflow integration
- Updated bundled skills documentation to clarify the structure and usage across all platforms, ensuring consistency in skill root paths. - Introduced a new `inject-spec-context.py` hook for path-scoped spec context injection, improving the relevance of injected specs during file interactions. - Enhanced existing hooks to support workflow resolution, allowing for dynamic selection of workflows based on task context. - Added a command to manage workflow selections for active tasks, enabling better task management and workflow adherence. - Updated configuration options for spec injection, including character limits and refresh windows, to optimize performance and usability.
This commit is contained in:
Regular → Executable
+13
-5
@@ -215,11 +215,12 @@ def truncate_utf8(data: bytes, cap: int) -> bytes:
|
||||
seq_len = 4
|
||||
else:
|
||||
seq_len = 1
|
||||
# Drop the lead byte too if its full sequence didn't fit.
|
||||
# Cut before the lead byte when its full sequence didn't fit;
|
||||
# otherwise the trailing sequence is complete — keep it whole.
|
||||
if (i - 1) + seq_len > len(truncated):
|
||||
i -= 1
|
||||
return truncated[: i - 1]
|
||||
|
||||
return truncated[:i]
|
||||
return truncated
|
||||
|
||||
|
||||
class _Budget:
|
||||
@@ -877,8 +878,15 @@ def _handle_codex_subagent_start(input_data: dict) -> None:
|
||||
if not subagent_type or not parent_session_id:
|
||||
return
|
||||
|
||||
cwd = _string_value(input_data.get("cwd")) or os.getcwd()
|
||||
repo_root = find_repo_root(cwd)
|
||||
# Payload cwd first, then our own — some hosts (CodeBuddy IDE 4.10.4)
|
||||
# report "/" for every hook event. See inject-workflow-state.py.
|
||||
repo_root = None
|
||||
for candidate in (_string_value(input_data.get("cwd")), os.getcwd()):
|
||||
if not candidate:
|
||||
continue
|
||||
repo_root = find_repo_root(candidate)
|
||||
if repo_root:
|
||||
break
|
||||
if not repo_root:
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user