mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
feat(cli-stream): add search functionality and improve validation in CLI Stream Viewer
This commit is contained in:
@@ -17,10 +17,23 @@ function initCliStreamViewer() {
|
||||
// Initialize keyboard shortcuts
|
||||
document.addEventListener('keydown', function(e) {
|
||||
if (e.key === 'Escape' && isCliStreamViewerOpen) {
|
||||
toggleCliStreamViewer();
|
||||
if (searchFilter) {
|
||||
clearSearch();
|
||||
} else {
|
||||
toggleCliStreamViewer();
|
||||
}
|
||||
}
|
||||
// Ctrl+F to focus search when viewer is open
|
||||
if ((e.ctrlKey || e.metaKey) && e.key === 'f' && isCliStreamViewerOpen) {
|
||||
e.preventDefault();
|
||||
const searchInput = document.getElementById('cliStreamSearchInput');
|
||||
if (searchInput) {
|
||||
searchInput.focus();
|
||||
searchInput.select();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Initialize scroll detection for auto-scroll
|
||||
const content = document.getElementById('cliStreamContent');
|
||||
if (content) {
|
||||
@@ -491,7 +504,9 @@ function _streamT(key) {
|
||||
'cliStream.autoScroll': 'Auto-scroll',
|
||||
'cliStream.close': 'Close',
|
||||
'cliStream.cannotCloseRunning': 'Cannot close running execution',
|
||||
'cliStream.lines': 'lines'
|
||||
'cliStream.lines': 'lines',
|
||||
'cliStream.searchPlaceholder': 'Search output...',
|
||||
'cliStream.filterResults': 'results'
|
||||
};
|
||||
return fallbacks[key] || key;
|
||||
}
|
||||
|
||||
@@ -55,6 +55,8 @@ const i18n = {
|
||||
'cliStream.close': 'Close',
|
||||
'cliStream.cannotCloseRunning': 'Cannot close running execution',
|
||||
'cliStream.lines': 'lines',
|
||||
'cliStream.searchPlaceholder': 'Search output...',
|
||||
'cliStream.filterResults': 'results',
|
||||
|
||||
// Sidebar - Project section
|
||||
'nav.project': 'Project',
|
||||
@@ -1975,6 +1977,8 @@ const i18n = {
|
||||
'cliStream.close': '关闭',
|
||||
'cliStream.cannotCloseRunning': '无法关闭运行中的执行',
|
||||
'cliStream.lines': '行',
|
||||
'cliStream.searchPlaceholder': '搜索输出...',
|
||||
'cliStream.filterResults': '条结果',
|
||||
|
||||
// Sidebar - Project section
|
||||
'nav.project': '项目',
|
||||
|
||||
Reference in New Issue
Block a user