feat: add streaming ui configuration

This commit is contained in:
a.tolmachev
2026-04-06 12:04:49 +03:00
parent fdd0a45124
commit b40daf4f54
20 changed files with 2254 additions and 20 deletions
+234
View File
@@ -1569,6 +1569,240 @@ var TRANSLATIONS = {
}
};
Object.assign(TRANSLATIONS.en, {
'wizard.streaming.title': 'Streaming execution',
'wizard.streaming.subtitle': 'Bounded stream, session and async job settings for MCP tool families.',
'wizard.streaming.execution_mode': 'Execution mode',
'wizard.streaming.transport_behavior': 'Transport behavior',
'wizard.streaming.aggregation_mode': 'Aggregation mode',
'wizard.streaming.window_duration': 'Window duration (ms)',
'wizard.streaming.poll_interval': 'Poll interval (ms)',
'wizard.streaming.upstream_timeout': 'Upstream timeout (ms)',
'wizard.streaming.idle_timeout': 'Idle timeout (ms)',
'wizard.streaming.session_lifetime': 'Session lifetime (ms)',
'wizard.streaming.max_items': 'Max items',
'wizard.streaming.max_bytes': 'Max bytes',
'wizard.streaming.max_field_length': 'Max field length',
'wizard.streaming.sampling_rate': 'Sampling rate',
'wizard.streaming.items_path': 'Items path',
'wizard.streaming.summary_path': 'Summary path',
'wizard.streaming.done_path': 'Done path',
'wizard.streaming.cursor_path': 'Cursor path',
'wizard.streaming.status_path': 'Status path',
'wizard.streaming.redacted_paths': 'Redacted paths',
'wizard.streaming.truncate_item_fields': 'Truncate item fields',
'wizard.streaming.drop_duplicates': 'Drop duplicates',
'wizard.streaming.tool_family': 'Tool family',
'wizard.streaming.start_tool_name': 'Start tool name',
'wizard.streaming.poll_tool_name': 'Poll tool name',
'wizard.streaming.stop_tool_name': 'Stop tool name',
'wizard.streaming.status_tool_name': 'Status tool name',
'wizard.streaming.result_tool_name': 'Result tool name',
'wizard.streaming.cancel_tool_name': 'Cancel tool name',
'wizard.streaming.mode.unary': 'Unary',
'wizard.streaming.mode.window': 'Window',
'wizard.streaming.mode.session': 'Session',
'wizard.streaming.mode.async_job': 'Async job',
'wizard.streaming.transport.request_response': 'Request / response',
'wizard.streaming.transport.server_stream': 'Server stream',
'wizard.streaming.transport.stateful_session': 'Stateful session',
'wizard.streaming.transport.deferred_result': 'Deferred result',
'wizard.streaming.aggregation.raw_items': 'Raw items',
'wizard.streaming.aggregation.summary_only': 'Summary only',
'wizard.streaming.aggregation.summary_plus_samples': 'Summary + samples',
'wizard.streaming.aggregation.stats': 'Stats',
'wizard.streaming.aggregation.latest_state': 'Latest state',
'wizard.streaming.help.unary': 'Unary keeps the existing request-response model. Other modes create bounded stream-aware MCP tools.',
'wizard.streaming.help.window': 'Window mode collects a bounded slice of data and returns a compact result.',
'wizard.streaming.help.session': 'Session mode publishes start/poll/stop tool families backed by persisted stream sessions.',
'wizard.streaming.help.async_job': 'Async job mode publishes start/status/result/cancel tools and stores runtime job state.',
'stream_sessions.title': 'Stream sessions',
'stream_sessions.subtitle': 'Inspect stateful streaming sessions created by generated MCP tool families.',
'stream_sessions.refresh': 'Refresh',
'stream_sessions.summary': '{count} sessions',
'stream_sessions.filter.all_statuses': 'All statuses',
'stream_sessions.filter.all_modes': 'All modes',
'stream_sessions.loading.title': 'Loading stream sessions…',
'stream_sessions.loading.body': 'Fetching persisted session state for the current workspace.',
'stream_sessions.error.title': 'Unable to load stream sessions',
'stream_sessions.error.workspace': 'Workspace is not selected',
'stream_sessions.error.load': 'Failed to load stream sessions',
'stream_sessions.empty.title': 'No stream sessions found',
'stream_sessions.empty.body': 'Session-mode MCP tools will create entries here after start/poll/stop flows.',
'stream_sessions.operation': 'Operation: {operation}',
'stream_sessions.meta.created': 'Created',
'stream_sessions.meta.last_poll': 'Last poll',
'stream_sessions.meta.expires': 'Expires',
'stream_sessions.meta.agent': 'Agent',
'stream_sessions.cursor': 'Cursor',
'stream_sessions.stop': 'Stop session',
'stream_sessions.show_details': 'Show details',
'stream_sessions.hide_details': 'Hide details',
'stream_sessions.toast.stop.title': 'Session stopped',
'stream_sessions.toast.stop.body': 'The stream session was stopped.',
'stream_sessions.toast.stop_error.title': 'Stop failed',
'stream_sessions.toast.stop_error.body': 'Failed to stop stream session',
'stream_sessions.status.created': 'Created',
'stream_sessions.status.running': 'Running',
'stream_sessions.status.failed': 'Failed',
'stream_sessions.status.stopped': 'Stopped',
'stream_sessions.status.expired': 'Expired',
'async_jobs.title': 'Async jobs',
'async_jobs.subtitle': 'Inspect deferred jobs started by streaming MCP tool families.',
'async_jobs.refresh': 'Refresh',
'async_jobs.summary': '{count} jobs',
'async_jobs.filter.all_statuses': 'All statuses',
'async_jobs.loading.title': 'Loading async jobs…',
'async_jobs.loading.body': 'Fetching persisted job state for the current workspace.',
'async_jobs.error.title': 'Unable to load async jobs',
'async_jobs.error.workspace': 'Workspace is not selected',
'async_jobs.error.load': 'Failed to load async jobs',
'async_jobs.empty.title': 'No async jobs found',
'async_jobs.empty.body': 'Async job MCP tools will create entries here after start/status/result flows.',
'async_jobs.operation': 'Operation: {operation}',
'async_jobs.meta.created': 'Created',
'async_jobs.meta.updated': 'Updated',
'async_jobs.meta.finished': 'Finished',
'async_jobs.meta.expires': 'Expires',
'async_jobs.progress': 'Progress payload',
'async_jobs.error_preview': 'Error preview',
'async_jobs.result': 'Result payload',
'async_jobs.result_loading': 'Loading result…',
'async_jobs.result_error': 'Failed to load result',
'async_jobs.cancel': 'Cancel job',
'async_jobs.show_details': 'Show details',
'async_jobs.hide_details': 'Hide details',
'async_jobs.toast.cancel.title': 'Job cancelled',
'async_jobs.toast.cancel.body': 'The async job was cancelled.',
'async_jobs.toast.cancel_error.title': 'Cancel failed',
'async_jobs.toast.cancel_error.body': 'Failed to cancel async job',
'async_jobs.status.created': 'Created',
'async_jobs.status.running': 'Running',
'async_jobs.status.completed': 'Completed',
'async_jobs.status.failed': 'Failed',
'async_jobs.status.cancelled': 'Cancelled',
'async_jobs.status.expired': 'Expired',
});
Object.assign(TRANSLATIONS.ru, {
'wizard.streaming.title': 'Потоковое выполнение',
'wizard.streaming.subtitle': 'Ограниченные настройки стрима, сессий и async job для семейств MCP-инструментов.',
'wizard.streaming.execution_mode': 'Режим выполнения',
'wizard.streaming.transport_behavior': 'Поведение транспорта',
'wizard.streaming.aggregation_mode': 'Режим агрегации',
'wizard.streaming.window_duration': 'Длительность окна (мс)',
'wizard.streaming.poll_interval': 'Интервал poll (мс)',
'wizard.streaming.upstream_timeout': 'Таймаут upstream (мс)',
'wizard.streaming.idle_timeout': 'Таймаут простоя (мс)',
'wizard.streaming.session_lifetime': 'Время жизни сессии (мс)',
'wizard.streaming.max_items': 'Максимум элементов',
'wizard.streaming.max_bytes': 'Максимум байт',
'wizard.streaming.max_field_length': 'Максимальная длина поля',
'wizard.streaming.sampling_rate': 'Частота выборки',
'wizard.streaming.items_path': 'Путь к items',
'wizard.streaming.summary_path': 'Путь к summary',
'wizard.streaming.done_path': 'Путь к done',
'wizard.streaming.cursor_path': 'Путь к cursor',
'wizard.streaming.status_path': 'Путь к status',
'wizard.streaming.redacted_paths': 'Скрываемые пути',
'wizard.streaming.truncate_item_fields': 'Обрезать поля элементов',
'wizard.streaming.drop_duplicates': 'Удалять дубликаты',
'wizard.streaming.tool_family': 'Семейство инструментов',
'wizard.streaming.start_tool_name': 'Имя start-инструмента',
'wizard.streaming.poll_tool_name': 'Имя poll-инструмента',
'wizard.streaming.stop_tool_name': 'Имя stop-инструмента',
'wizard.streaming.status_tool_name': 'Имя status-инструмента',
'wizard.streaming.result_tool_name': 'Имя result-инструмента',
'wizard.streaming.cancel_tool_name': 'Имя cancel-инструмента',
'wizard.streaming.mode.unary': 'Unary',
'wizard.streaming.mode.window': 'Window',
'wizard.streaming.mode.session': 'Session',
'wizard.streaming.mode.async_job': 'Async job',
'wizard.streaming.transport.request_response': 'Запрос / ответ',
'wizard.streaming.transport.server_stream': 'Серверный стрим',
'wizard.streaming.transport.stateful_session': 'Состояние сессии',
'wizard.streaming.transport.deferred_result': 'Отложенный результат',
'wizard.streaming.aggregation.raw_items': 'Сырые элементы',
'wizard.streaming.aggregation.summary_only': 'Только summary',
'wizard.streaming.aggregation.summary_plus_samples': 'Summary + примеры',
'wizard.streaming.aggregation.stats': 'Статистика',
'wizard.streaming.aggregation.latest_state': 'Последнее состояние',
'wizard.streaming.help.unary': 'Unary сохраняет текущую модель запрос-ответ. Остальные режимы создают ограниченные потоковые MCP-инструменты.',
'wizard.streaming.help.window': 'Режим window собирает ограниченный срез данных и возвращает компактный результат.',
'wizard.streaming.help.session': 'Режим session публикует семейство start/poll/stop и опирается на сохраненные stream sessions.',
'wizard.streaming.help.async_job': 'Режим async job публикует start/status/result/cancel и хранит состояние фоновой задачи.',
'stream_sessions.title': 'Потоковые сессии',
'stream_sessions.subtitle': 'Просмотр stateful streaming-сессий, созданных сгенерированными семействами MCP-инструментов.',
'stream_sessions.refresh': 'Обновить',
'stream_sessions.summary': '{count} сессий',
'stream_sessions.filter.all_statuses': 'Все статусы',
'stream_sessions.filter.all_modes': 'Все режимы',
'stream_sessions.loading.title': 'Загрузка потоковых сессий…',
'stream_sessions.loading.body': 'Получаем сохраненное состояние сессий для текущего workspace.',
'stream_sessions.error.title': 'Не удалось загрузить потоковые сессии',
'stream_sessions.error.workspace': 'Workspace не выбран',
'stream_sessions.error.load': 'Не удалось загрузить потоковые сессии',
'stream_sessions.empty.title': 'Потоковых сессий пока нет',
'stream_sessions.empty.body': 'Сессии появятся здесь после вызовов start/poll/stop для session-mode инструментов.',
'stream_sessions.operation': 'Операция: {operation}',
'stream_sessions.meta.created': 'Создана',
'stream_sessions.meta.last_poll': 'Последний poll',
'stream_sessions.meta.expires': 'Истекает',
'stream_sessions.meta.agent': 'Агент',
'stream_sessions.cursor': 'Cursor',
'stream_sessions.stop': 'Остановить сессию',
'stream_sessions.show_details': 'Показать детали',
'stream_sessions.hide_details': 'Скрыть детали',
'stream_sessions.toast.stop.title': 'Сессия остановлена',
'stream_sessions.toast.stop.body': 'Потоковая сессия остановлена.',
'stream_sessions.toast.stop_error.title': 'Не удалось остановить',
'stream_sessions.toast.stop_error.body': 'Не удалось остановить потоковую сессию',
'stream_sessions.status.created': 'Создана',
'stream_sessions.status.running': 'Выполняется',
'stream_sessions.status.failed': 'Ошибка',
'stream_sessions.status.stopped': 'Остановлена',
'stream_sessions.status.expired': 'Истекла',
'async_jobs.title': 'Асинхронные задачи',
'async_jobs.subtitle': 'Просмотр отложенных задач, запущенных потоковыми семействами MCP-инструментов.',
'async_jobs.refresh': 'Обновить',
'async_jobs.summary': '{count} задач',
'async_jobs.filter.all_statuses': 'Все статусы',
'async_jobs.loading.title': 'Загрузка async job…',
'async_jobs.loading.body': 'Получаем сохраненное состояние задач для текущего workspace.',
'async_jobs.error.title': 'Не удалось загрузить async job',
'async_jobs.error.workspace': 'Workspace не выбран',
'async_jobs.error.load': 'Не удалось загрузить async job',
'async_jobs.empty.title': 'Асинхронных задач пока нет',
'async_jobs.empty.body': 'Задачи появятся здесь после вызовов start/status/result для async job инструментов.',
'async_jobs.operation': 'Операция: {operation}',
'async_jobs.meta.created': 'Создана',
'async_jobs.meta.updated': 'Обновлена',
'async_jobs.meta.finished': 'Завершена',
'async_jobs.meta.expires': 'Истекает',
'async_jobs.progress': 'Payload прогресса',
'async_jobs.error_preview': 'Предпросмотр ошибки',
'async_jobs.result': 'Payload результата',
'async_jobs.result_loading': 'Загрузка результата…',
'async_jobs.result_error': 'Не удалось загрузить результат',
'async_jobs.cancel': 'Отменить задачу',
'async_jobs.show_details': 'Показать детали',
'async_jobs.hide_details': 'Скрыть детали',
'async_jobs.toast.cancel.title': 'Задача отменена',
'async_jobs.toast.cancel.body': 'Асинхронная задача отменена.',
'async_jobs.toast.cancel_error.title': 'Не удалось отменить',
'async_jobs.toast.cancel_error.body': 'Не удалось отменить async job',
'async_jobs.status.created': 'Создана',
'async_jobs.status.running': 'Выполняется',
'async_jobs.status.completed': 'Завершена',
'async_jobs.status.failed': 'Ошибка',
'async_jobs.status.cancelled': 'Отменена',
'async_jobs.status.expired': 'Истекла',
});
function t(key) {
var lang = localStorage.getItem('crank_lang') || 'en';
var tr = TRANSLATIONS[lang] || TRANSLATIONS.en;