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
2 changes: 1 addition & 1 deletion .github/workflows/check_pypi_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12", "3.11", "3.10"]
python-version: ["3.14", "3.13", "3.12", "3.11", "3.10"]

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12", "3.11", "3.10"]
python-version: ["3.14", "3.13", "3.12", "3.11", "3.10"]

steps:
- name: Check out repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.12", "3.11", "3.10"]
python-version: ["3.14", "3.13", "3.12", "3.11", "3.10"]

steps:
- name: Check out repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_check_pypi_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.12", "3.11", "3.10"]
python-version: ["3.14", "3.13", "3.12", "3.11", "3.10"]
defaults:
run:
shell: pwsh # Use PowerShell for all run steps
Expand Down
2 changes: 1 addition & 1 deletion cecli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from packaging import version

__version__ = "0.96.0.dev"
__version__ = "0.96.1.dev"
safe_version = __version__

try:
Expand Down
12 changes: 0 additions & 12 deletions cecli/coders/agent_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,6 @@ async def reply_completed(self):
_ = await self.auto_commit(self.files_edited_by_tools)
return False
self.partial_response_content = processed_content.strip()
self._process_file_mentions(processed_content)
has_search = "<<<<<<< SEARCH" in self.partial_response_content
has_divider = "=======" in self.partial_response_content
has_replace = ">>>>>>> REPLACE" in self.partial_response_content
Expand Down Expand Up @@ -1463,17 +1462,6 @@ def _add_file_to_context(self, file_path, explicit=False):
self.io.tool_error(f"Error adding file '{file_path}' for viewing: {str(e)}")
return f"Error adding file for viewing: {str(e)}"

def _process_file_mentions(self, content):
"""
Process implicit file mentions in the content, adding files if they're not already in context.

This handles the case where the LLM mentions file paths without using explicit tool commands.
"""
mentioned_files = set(self.get_file_mentions(content, ignore_current=False))
current_files = set(self.get_inchat_relative_files())
mentioned_files - current_files
pass

async def check_for_file_mentions(self, content):
"""
Override parent's method to use our own file processing logic.
Expand Down
201 changes: 101 additions & 100 deletions cecli/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@
from .code import CodeCommand
from .command_prefix import CommandPrefixCommand
from .commit import CommitCommand
from .compact import CompactCommand
from .context import ContextCommand
from .context_blocks import ContextBlocksCommand
from .context_management import ContextManagementCommand
from .copy import CopyCommand
from .copy_context import CopyContextCommand
from .core import Commands, SwitchCoderSignal
from .diff import DiffCommand

# Import and register commands
from .drop import DropCommand
from .editor import EditCommand, EditorCommand
from .editor_model import EditorModelCommand
Expand Down Expand Up @@ -76,129 +75,131 @@
from .web import WebCommand

# Register commands
CommandRegistry.register(DropCommand)
CommandRegistry.register(AddCommand)
CommandRegistry.register(AgentCommand)
CommandRegistry.register(ArchitectCommand)
CommandRegistry.register(AskCommand)
CommandRegistry.register(ClearCommand)
CommandRegistry.register(LsCommand)
CommandRegistry.register(DiffCommand)
CommandRegistry.register(ResetCommand)
CommandRegistry.register(CodeCommand)
CommandRegistry.register(CommandPrefixCommand)
CommandRegistry.register(CommitCommand)
CommandRegistry.register(CompactCommand)
CommandRegistry.register(ContextBlocksCommand)
CommandRegistry.register(ContextCommand)
CommandRegistry.register(ContextManagementCommand)
CommandRegistry.register(CopyCommand)
CommandRegistry.register(PasteCommand)
CommandRegistry.register(SettingsCommand)
CommandRegistry.register(ReportCommand)
CommandRegistry.register(TokensCommand)
CommandRegistry.register(UndoCommand)
CommandRegistry.register(CopyContextCommand)
CommandRegistry.register(DiffCommand)
CommandRegistry.register(DropCommand)
CommandRegistry.register(EditCommand)
CommandRegistry.register(EditorCommand)
CommandRegistry.register(EditorModelCommand)
CommandRegistry.register(ExitCommand)
CommandRegistry.register(GitCommand)
CommandRegistry.register(RunCommand)
CommandRegistry.register(HelpCommand)
CommandRegistry.register(CommitCommand)
CommandRegistry.register(ModelsCommand)
CommandRegistry.register(ExitCommand)
CommandRegistry.register(QuitCommand)
CommandRegistry.register(VoiceCommand)
CommandRegistry.register(MapCommand)
CommandRegistry.register(MapRefreshCommand)
CommandRegistry.register(MultilineModeCommand)
CommandRegistry.register(EditorCommand)
CommandRegistry.register(EditCommand)
CommandRegistry.register(HistorySearchCommand)
CommandRegistry.register(ThinkTokensCommand)
CommandRegistry.register(LoadCommand)
CommandRegistry.register(SaveCommand)
CommandRegistry.register(ReasoningEffortCommand)
CommandRegistry.register(SaveSessionCommand)
CommandRegistry.register(LintCommand)
CommandRegistry.register(ListSessionsCommand)
CommandRegistry.register(LoadCommand)
CommandRegistry.register(LoadMcpCommand)
CommandRegistry.register(LoadSessionCommand)
CommandRegistry.register(LoadSkillCommand)
CommandRegistry.register(LsCommand)
CommandRegistry.register(MapCommand)
CommandRegistry.register(MapRefreshCommand)
CommandRegistry.register(ModelCommand)
CommandRegistry.register(ModelsCommand)
CommandRegistry.register(MultilineModeCommand)
CommandRegistry.register(PasteCommand)
CommandRegistry.register(QuitCommand)
CommandRegistry.register(ReadOnlyCommand)
CommandRegistry.register(ReadOnlyStubCommand)
CommandRegistry.register(AddCommand)
CommandRegistry.register(ModelCommand)
CommandRegistry.register(WeakModelCommand)
CommandRegistry.register(EditorModelCommand)
CommandRegistry.register(WebCommand)
CommandRegistry.register(LintCommand)
CommandRegistry.register(TestCommand)
CommandRegistry.register(ContextManagementCommand)
CommandRegistry.register(ContextBlocksCommand)
CommandRegistry.register(AskCommand)
CommandRegistry.register(CodeCommand)
CommandRegistry.register(ArchitectCommand)
CommandRegistry.register(ContextCommand)
CommandRegistry.register(AgentCommand)
CommandRegistry.register(CopyContextCommand)
CommandRegistry.register(CommandPrefixCommand)
CommandRegistry.register(LoadSkillCommand)
CommandRegistry.register(ReasoningEffortCommand)
CommandRegistry.register(RemoveMcpCommand)
CommandRegistry.register(RemoveSkillCommand)
CommandRegistry.register(ReportCommand)
CommandRegistry.register(ResetCommand)
CommandRegistry.register(RunCommand)
CommandRegistry.register(SaveCommand)
CommandRegistry.register(SaveSessionCommand)
CommandRegistry.register(SettingsCommand)
CommandRegistry.register(TerminalSetupCommand)
CommandRegistry.register(LoadMcpCommand)
CommandRegistry.register(RemoveMcpCommand)
CommandRegistry.register(TestCommand)
CommandRegistry.register(ThinkTokensCommand)
CommandRegistry.register(TokensCommand)
CommandRegistry.register(UndoCommand)
CommandRegistry.register(VoiceCommand)
CommandRegistry.register(WeakModelCommand)
CommandRegistry.register(WebCommand)


__all__ = [
"AddCommand",
"AgentCommand",
"ArchitectCommand",
"AskCommand",
"BaseCommand",
"CommandRegistry",
"ClearCommand",
"CodeCommand",
"CommandError",
"quote_filename",
"parse_quoted_filenames",
"glob_filtered_to_repo",
"validate_file_access",
"CommandPrefixCommand",
"CommandRegistry",
"Commands",
"CommitCommand",
"CompactCommand",
"ContextBlocksCommand",
"ContextCommand",
"ContextManagementCommand",
"CopyCommand",
"CopyContextCommand",
"DiffCommand",
"DropCommand",
"EditCommand",
"EditorCommand",
"EditorModelCommand",
"ExitCommand",
"expand_subdir",
"format_command_result",
"get_available_files",
"expand_subdir",
"DropCommand",
"ClearCommand",
"LsCommand",
"DiffCommand",
"ResetCommand",
"CopyCommand",
"PasteCommand",
"SettingsCommand",
"ReportCommand",
"TokensCommand",
"UndoCommand",
"GitCommand",
"RunCommand",
"glob_filtered_to_repo",
"HelpCommand",
"CommitCommand",
"ModelsCommand",
"ExitCommand",
"QuitCommand",
"VoiceCommand",
"MapCommand",
"MapRefreshCommand",
"MultilineModeCommand",
"EditorCommand",
"EditCommand",
"HistorySearchCommand",
"ThinkTokensCommand",
"LoadCommand",
"SaveCommand",
"ReasoningEffortCommand",
"SaveSessionCommand",
"LintCommand",
"ListSessionsCommand",
"LoadCommand",
"LoadMcpCommand",
"LoadSessionCommand",
"LoadSkillCommand",
"LsCommand",
"MapCommand",
"MapRefreshCommand",
"ModelCommand",
"ModelsCommand",
"MultilineModeCommand",
"parse_quoted_filenames",
"PasteCommand",
"quote_filename",
"QuitCommand",
"ReadOnlyCommand",
"ReadOnlyStubCommand",
"AddCommand",
"ModelCommand",
"WeakModelCommand",
"EditorModelCommand",
"WebCommand",
"LintCommand",
"TestCommand",
"ContextManagementCommand",
"ContextBlocksCommand",
"AskCommand",
"CodeCommand",
"ArchitectCommand",
"ContextCommand",
"AgentCommand",
"CopyContextCommand",
"CommandPrefixCommand",
"LoadSkillCommand",
"ReasoningEffortCommand",
"RemoveMcpCommand",
"RemoveSkillCommand",
"TerminalSetupCommand",
"ReportCommand",
"ResetCommand",
"RunCommand",
"SaveCommand",
"SaveSessionCommand",
"SettingsCommand",
"SwitchCoderSignal",
"Commands",
"LoadMcpCommand",
"RemoveMcpCommand",
"TerminalSetupCommand",
"TestCommand",
"ThinkTokensCommand",
"TokensCommand",
"UndoCommand",
"validate_file_access",
"VoiceCommand",
"WeakModelCommand",
"WebCommand",
]
2 changes: 1 addition & 1 deletion cecli/commands/command_prefix.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class CommandPrefixCommand(BaseCommand):
NORM_NAME = "command-prefix"
DESCRIPTION = "Change Command Prefix For All Running Commands"
DESCRIPTION = "Change command prefix for all running commands"

@classmethod
async def execute(cls, io, coder, args, **kwargs):
Expand Down
14 changes: 14 additions & 0 deletions cecli/commands/compact.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from .utils.base_command import BaseCommand


class CompactCommand(BaseCommand):
NORM_NAME = "compact"
DESCRIPTION = "Force compaction of the chat history context"

@classmethod
async def execute(cls, io, coder, args, **kwargs):
await coder.compact_context_if_needed(force=True)

@classmethod
def get_help(cls) -> str:
return "Force compaction of the chat history context."
4 changes: 2 additions & 2 deletions cecli/commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@ def get_raw_completions(self, cmd):
raw_completer = getattr(self, f"completions_raw_{cmd}", None)
return raw_completer

def get_completions(self, cmd):
def get_completions(self, cmd, args=""):
assert cmd.startswith("/")
cmd = cmd[1:]
command_class = CommandRegistry.get_command(cmd)
if command_class:
return command_class.get_completions(self.io, self.coder, "")
return command_class.get_completions(self.io, self.coder, args)
return []

def get_commands(self):
Expand Down
6 changes: 5 additions & 1 deletion cecli/commands/paste.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ async def execute(cls, io, coder, args, **kwargs):
# If not an image, try to get text
text = pyperclip.paste()
if text:
io.tool_output(text)
if coder.tui and coder.tui():
coder.tui().set_input_value(text)
else:
coder.io.set_placeholder(text)

return format_command_result(io, "paste", "Pasted text from clipboard")

io.tool_error("No image or text content found in clipboard.")
Expand Down
Loading
Loading