Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion codetide/agents/tide/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ async def agent_loop(self, codeIdentifiers :Optional[List[str]]=None):

codeIdentifiers = self.contextIdentifiers or []
if self.modifyIdentifiers:
codeIdentifiers.extend(self.tide._as_file_paths(self.modifyIdentifiers))
self.modifyIdentifiers = self.tide._as_file_paths(self.modifyIdentifiers)
codeIdentifiers.extend(self.modifyIdentifiers)

# --- End Unified Identifier Retrieval ---
if codeIdentifiers:
Expand Down
7 changes: 4 additions & 3 deletions codetide/agents/tide/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@
- Write solutions or code modifications
- Access actual identifier definitions
- Acknowledge that viewing file contents is outside your scope
- Use markdown formatting, bold text, italics, headers, code blocks, or any special formatting whatsoever

**YOUR SOLE PURPOSE:** Gather required identifiers superficially and minimally based only on file/directory structure and naming patterns.

Expand Down Expand Up @@ -505,9 +506,9 @@
**MANDATORY OUTPUT FORMAT**

**RESPONSE STRUCTURE (STRICT):**
- Begin with a single short paragraph that briefly explains your reasoning. Keep it concise, direct, and to the point - no extended detail, no repetition, no looping. Plain text only, no labels, headers, or formatting.
- Then output the required blocks exactly as shown below.
- **Do NOT include any section headers, labels, or headings such as "Analysis and Decision Rationale:" or similar. Only output the explanation and the required blocks.**
- Begin with a single short paragraph in plaint text that briefly explains your reasoning. Keep it concise, direct, and to the point - no extended detail, no repetition, no looping. Plain text only with no formatting, no labels, headers, bold text, italics, code blocks, asterisks, underscores, or any markdown syntax.
- Then output the required blocks exactly as shown below using only plain text.
- **Do NOT** include any section headers, labels, headings, formatting, or markdown syntax such as "Analysis and Decision Rationale:" or similar. Only output the explanation and the required blocks in plain text format.

**Identifier Sections:**
```
Expand Down
6 changes: 4 additions & 2 deletions codetide/agents/tide/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def parse_blocks(text: str, block_word: str = "Commit", multiple: bool = True) -
"""
Extract content between *** Begin <block_word> and *** End <block_word> markers (exclusive),
ensuring that both markers are at zero indentation (start of line, no leading spaces).
Handles trailing spaces after the block_word.

Args:
text: Full input text containing one or more blocks.
Expand All @@ -52,8 +53,9 @@ def parse_blocks(text: str, block_word: str = "Commit", multiple: bool = True) -
# Escape the block_word to handle any special regex characters
escaped_word = re.escape(block_word)

# Create pattern with the parameterized block word
pattern = rf"(?m)^\*\*\* Begin {escaped_word}\n([\s\S]*?)^\*\*\* End {escaped_word}$"
# Create pattern with the parameterized block word, allowing trailing spaces
# \s* allows for zero or more whitespace characters after the block_word
pattern = rf"(?m)^\*\*\* Begin {escaped_word}\s*\n([\s\S]*?)^\*\*\* End {escaped_word}\s*$"
matches = re.findall(pattern, text)

if not matches:
Expand Down