fix(opencode): the 2.x home placeholder is not typed input, cut example included (Issue #60, Linux item 1)
An adapter can now name its placeholder as a pattern the box's first line matches in full (input_placeholder_pattern); input_placeholder stays the literal lib.sh greps for. opencode: `Ask anything… "<example>"`, the closing quote optional because a box under ~65 columns cuts the example. Fixtures: the 140-column herdr capture and a 60-column one with the cut example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4d49abb371
commit
14d7a46181
6 files changed
+170
-2
No files matched your search
@@ -50,6 +50,12 @@ class OpenCodeAgentAdapter(BaseAgentAdapter):
|
||||
def input_placeholder(self) -> Optional[str]:
|
||||
return ''
|
||||
|
||||
@property
|
||||
def input_placeholder_pattern(self) -> Optional[str]:
|
||||
# 2.x home screen: `Ask anything… "<example>"`, the example picked per
|
||||
# launch and cut without its closing quote in a narrow box (Issue #60).
|
||||
return r'Ask anything(?:…|\.\.\.)(?: "[^"]*"?)?'
|
||||
|
||||
@property
|
||||
def input_rule_pattern(self) -> Optional[str]:
|
||||
# Kept for lib.sh's readiness corroboration; the input box itself is a
|
||||
|
||||
Reference in new issue
Block a user