feat(plugin): OpenCode Companion beta.8 upgrade + streaming/overflow (#337)
* feat(plugin): OpenCode Companion beta.8 upgrade + streaming/overflow fixes Upgrade to plugin API 21 and reverse the chat so the newest message sits at the bottom with auto-scroll: - panel: reverse message list to oldest-first; pin the scroll to the bottom via stickToBottom, jump there on open and session switch via scrollToBottomRev, and clear the stick flag in onScroll when the user scrolls away so reading history doesn't yank them down. - composer: enable submitOnEnter so Enter sends and Shift+Enter inserts a newline; update en/vi placeholder and send-tooltip strings. - panel: render assistant replies as markdown (headings, lists, tables), keeping user messages as plain labels. Fix runtime errors surfaced during use: - panel: pin markdown width to WRAP — ui.markdown has no maxWidth prop, so a bare flexGrow left it unconstrained and single-line text overflowed. - panel: wrap fenced code blocks in monospace labels with a maxWidth — noctalia's MarkdownView never wraps code, so long bash/code lines spilled outside the panel. Text outside code fences stays markdown. - panel: coerce onScroll(offset, maxOffset) args with tonumber — the reconciler passes them as strings, raising "attempt to compare number <= string". - service: handle message.part.updated / message.updated streaming via throttled reload; acknowledge message.part.delta without reloading (the server emits one per token, and reloading on each decodes the whole history and blows the async callback CPU budget in json.decode). - service: handle session.updated / session.diff with a throttled session reload so auto-generated titles stay current in the chooser. Verified with luac syntax checks and a standalone split_markdown test (5 cases) and JSON validation of the translation files. * update version to 0.2.0
This commit is contained in:
@@ -5,11 +5,11 @@
|
||||
"dismiss_error": "Dismiss",
|
||||
"empty": "No messages yet. Send a prompt to begin.",
|
||||
"open_terminal": "Open in terminal",
|
||||
"placeholder": "Ask OpenCode anything… (Enter = newline, Ctrl+Enter = send)",
|
||||
"placeholder": "Ask OpenCode anything… (Enter = send, Shift+Enter = new line)",
|
||||
"refresh": "Refresh",
|
||||
"select_agent": "Agent",
|
||||
"select_model": "Model",
|
||||
"send": "Send (Ctrl+Enter)",
|
||||
"send": "Send (Enter)",
|
||||
"stop": "Stop",
|
||||
"thinking": "Thinking…",
|
||||
"title": "OpenCode Chat",
|
||||
@@ -106,10 +106,6 @@
|
||||
"description": "Messages loaded per session (1–100). Set the slider to its top notch for unlimited. Default: 50.",
|
||||
"label": "Max Messages to Load"
|
||||
},
|
||||
"notify_on_complete": {
|
||||
"description": "Show a desktop notification when a response completes.",
|
||||
"label": "Notify on Completion"
|
||||
},
|
||||
"panel_mode": {
|
||||
"description": "Fill right opens a full-height panel pinned to the right edge; Compact shows the original floating panel near the bar click.",
|
||||
"label": "Panel Layout",
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
"dismiss_error": "Bỏ qua",
|
||||
"empty": "Chưa có tin nhắn. Gửi prompt để bắt đầu.",
|
||||
"open_terminal": "Mở trong terminal",
|
||||
"placeholder": "Hỏi OpenCode bất cứ điều gì… (Enter = xuống dòng, Ctrl+Enter = gửi)",
|
||||
"placeholder": "Hỏi OpenCode bất cứ điều gì… (Enter = Gửi, Shift+Enter = xuống dòng)",
|
||||
"refresh": "Làm mới",
|
||||
"select_agent": "Agent",
|
||||
"select_model": "Mô hình",
|
||||
"send": "Gửi (Ctrl+Enter)",
|
||||
"send": "Gửi (Enter)",
|
||||
"stop": "Dừng",
|
||||
"thinking": "Đang suy nghĩ…",
|
||||
"title": "OpenCode Chat",
|
||||
@@ -86,7 +86,6 @@
|
||||
"label": "Agent mặc định"
|
||||
},
|
||||
"default_model": {
|
||||
"description": "Model mặc định theo định dạng 'provider/model' (ví dụ: 'anthropic/claude-3-5-sonnet-20241022'). Để trống để dùng mặc định của máy chủ.",
|
||||
"label": "Model mặc định"
|
||||
},
|
||||
"default_workspace": {
|
||||
@@ -106,10 +105,6 @@
|
||||
"description": "Số tin nhắn tải mỗi phiên (1–100). Kéo thanh trượt lên mức cao nhất để không giới hạn. Mặc định: 50.",
|
||||
"label": "Số tin nhắn tải tối đa"
|
||||
},
|
||||
"notify_on_complete": {
|
||||
"description": "Hiển thị thông báo trên desktop khi phản hồi hoàn tất.",
|
||||
"label": "Thông báo khi hoàn tất"
|
||||
},
|
||||
"panel_mode": {
|
||||
"description": "Full-height sát phải mở panel cao trọn màn hình ghim vào mép phải; Compact hiển thị panel nổi gần chỗ bấm trên thanh bar.",
|
||||
"label": "Kiểu panel",
|
||||
|
||||
Reference in New Issue
Block a user