INNER CODE UNIT · Python

_on_paste

ApodexAI/FrontierAgent · apodex/tui/app.py:210

    def _on_paste(self, event: events.Paste) -> None:
        if event.text:
            self.app.paste_clipboard_text(event.text)  # type: ignore[attr-defined]
        else:
            # Some macOS terminals represent Cmd-V on a non-text clipboard as
            # an empty bracketed paste. They cannot carry the image bytes, but
            # the host bridge can now read NSPasteboard explicitly. Terminals
            # that swallow image Cmd-V entirely still require Ctrl-V or /paste.
            self.app.action_paste_clipboard()  # type: ignore[attr-defined]
        event.stop()


class FrontierAgentApp(App):
    """A Claude-Code-style TUI driving the FrontierAgent agent loop."""

    # Chrome is themed entirely through the tokens ``themes.register_themes``
    # pins from each palette: ``$text`` / ``$text-muted`` / ``$text-disabled``
    # are the three measured contrast tiers and ``$border`` the fitted line

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…