INNER CODE UNIT · Python
PromptInput
ApodexAI/FrontierAgent · apodex/tui/app.py:207
class PromptInput(Input):
"""Prompt that routes paste through attachment and multiline handling."""
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."""