cptr 0.1.6__tar.gz → 0.1.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cptr-0.1.6 → cptr-0.1.7}/CHANGELOG.md +6 -0
- {cptr-0.1.6 → cptr-0.1.7}/PKG-INFO +1 -1
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/package.json +1 -1
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/apis/chat.ts +2 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/chat/ChatPanel.svelte +22 -5
- {cptr-0.1.6 → cptr-0.1.7}/cptr/routers/chat.py +10 -1
- {cptr-0.1.6 → cptr-0.1.7}/pyproject.toml +1 -1
- {cptr-0.1.6 → cptr-0.1.7}/.dockerignore +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/.github/pull_request_template.md +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/.github/workflows/docker.yml +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/.github/workflows/pypi.yml +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/.github/workflows/release.yml +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/.gitignore +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/.python-version +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/CONTRIBUTOR_LICENSE_AGREEMENT +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/Dockerfile +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/LICENSE +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/MANIFESTO.md +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/README.md +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/__init__.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/app.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/cli.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/env.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/.gitignore +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/.npmrc +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/.prettierignore +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/.prettierrc +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/README.md +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/package-lock.json +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/app.css +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/app.d.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/app.html +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/apis/admin.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/apis/auth.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/apis/files.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/apis/git.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/apis/index.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/apis/state.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/apis/terminal.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/apis/uploads.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/assets/favicon.svg +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/Admin/Connections.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/Admin/CreateConnectionModal.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/Admin/CreateUserModal.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/Admin/EditConnectionModal.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/Admin/EditUserModal.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/Admin/Settings.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/Admin/Users.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/AdminPanel.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/AuthScreen.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/Bar.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/ChangelogModal.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/Collapsible.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/DirectoryPicker.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/DropdownMenu.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/FileBrowser.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/FileEditor.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/GitBar.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/GitView.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/GroupTabBar.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/Icon.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/KeyPill.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/Modal.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/PortNotification.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/PortPreview.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/QuickOpen.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/SaveDialog.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/Settings/About.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/Settings/Account.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/Settings/General.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/Settings/Keyboard.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/SettingsModal.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/ShortcutBar.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/Sidebar.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/SystemInfo.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/Terminal.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/ToggleSwitch.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/chat/AssistantMessage.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/chat/AttachButton.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/chat/ChatHistory.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/chat/ChatInput.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/chat/DictateButton.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/chat/FileMention.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/chat/FileSuggestionPopup.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/chat/ModelSelector.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/chat/OutputEditView.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/chat/PlusMenu.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/chat/QueuedMessageItem.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/chat/SendButton.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/chat/UserMessage.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/common/Pagination.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/markdown/BlockRenderer.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/markdown/CodeBlock.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/markdown/EditorToolbar.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/markdown/InlineRenderer.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/markdown/MarkdownRenderer.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/markdown/MermaidBlock.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/markdown/RichTextEditor.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/preview/CsvTable.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/preview/HtmlPreview.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/preview/ImagePreview.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/preview/JsonTreeView.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/preview/OfficePreview.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/preview/PDFViewer.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/preview/SqliteView.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/preview/SvgPreview.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/i18n/index.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/i18n/locales/de.json +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/i18n/locales/en.json +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/i18n/locales/es.json +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/i18n/locales/fr.json +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/i18n/locales/ja.json +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/i18n/locales/ko.json +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/i18n/locales/pt-BR.json +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/i18n/locales/ru.json +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/i18n/locales/zh-CN.json +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/i18n/locales/zh-TW.json +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/index.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/session.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/stores/chat.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/stores/gitStatus.svelte.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/stores/keybindings.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/stores/socket.svelte.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/stores/systemEvents.svelte.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/stores.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/tooltip.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/utils/fileIcon.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/routes/+layout.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/routes/+layout.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/routes/+page.svelte +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/static/favicon.ico +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/static/favicon.png +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/static/favicon.svg +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/static/icon-192.png +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/static/icon-512.png +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/static/manifest.json +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/static/robots.txt +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/static/user.png +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/svelte.config.js +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/tsconfig.json +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/vite.config.ts +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/migrations/env.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/migrations/script.py.mako +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/migrations/versions/0001_initial.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/models/__init__.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/models/base.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/models/chats.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/models/config.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/models/files.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/models/users.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/models/workspaces.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/routers/__init__.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/routers/admin.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/routers/auth.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/routers/events.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/routers/files.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/routers/git.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/routers/proxy.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/routers/state.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/routers/terminal.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/routers/uploads.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/routers/workspace.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/socket/__init__.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/socket/main.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/utils/__init__.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/utils/ai.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/utils/changelog.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/utils/chat_export.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/utils/chat_task.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/utils/config.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/utils/crypto.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/utils/db.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/utils/git.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/utils/json_parser.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/utils/proxy_middleware.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/utils/storage.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/utils/terminal.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/utils/tools.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/utils/web/__init__.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/utils/web/brave.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/utils/web/duckduckgo.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/utils/web/exa.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/utils/web/reader.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/utils/web/search.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/cptr/utils/web/tavily.py +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/demo.png +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/dev.sh +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/package.json +0 -0
- {cptr-0.1.6 → cptr-0.1.7}/uv.lock +0 -0
|
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.1.7] - 2026-06-07
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- 🔄 **Messages no longer disappear after sending.** Fixed a race condition where the frontend needed a separate GET request after sending a message, creating a window where socket events were dropped. The POST now returns the created messages directly, eliminating the round-trip and the race.
|
|
13
|
+
|
|
8
14
|
## [0.1.6] - 2026-06-07
|
|
9
15
|
|
|
10
16
|
### Added
|
|
@@ -541,8 +541,9 @@
|
|
|
541
541
|
created_at: Date.now()
|
|
542
542
|
}
|
|
543
543
|
];
|
|
544
|
-
} else {
|
|
545
|
-
|
|
544
|
+
} else if (result.assistant_message) {
|
|
545
|
+
allMessages = [...allMessages, result.assistant_message];
|
|
546
|
+
currentMessageId = result.message_id;
|
|
546
547
|
}
|
|
547
548
|
} catch (e) {
|
|
548
549
|
console.error('[chat] send (queue) error', e);
|
|
@@ -588,7 +589,17 @@
|
|
|
588
589
|
undefined,
|
|
589
590
|
files
|
|
590
591
|
);
|
|
591
|
-
|
|
592
|
+
|
|
593
|
+
// Swap optimistic temp msg with real messages from backend.
|
|
594
|
+
chatId = result.chat_id;
|
|
595
|
+
const withoutTemp = allMessages.filter((m) => m.id !== tempId);
|
|
596
|
+
if (result.user_message && result.assistant_message) {
|
|
597
|
+
allMessages = [...withoutTemp, result.user_message, result.assistant_message];
|
|
598
|
+
} else if (result.assistant_message) {
|
|
599
|
+
allMessages = [...withoutTemp, result.assistant_message];
|
|
600
|
+
}
|
|
601
|
+
currentMessageId = result.message_id;
|
|
602
|
+
|
|
592
603
|
if (isNew && tabId) {
|
|
593
604
|
updateTab(tabId, result.chat_id, text.slice(0, 40) || 'Chat');
|
|
594
605
|
}
|
|
@@ -737,7 +748,10 @@
|
|
|
737
748
|
tool_approval_mode: mode,
|
|
738
749
|
plan_mode: get(planMode)
|
|
739
750
|
});
|
|
740
|
-
|
|
751
|
+
if (result.assistant_message) {
|
|
752
|
+
allMessages = [...allMessages, result.assistant_message];
|
|
753
|
+
currentMessageId = result.message_id;
|
|
754
|
+
}
|
|
741
755
|
} catch (e) {
|
|
742
756
|
console.error('[chat] regenerate error', e);
|
|
743
757
|
}
|
|
@@ -777,7 +791,10 @@
|
|
|
777
791
|
msg.parent_id,
|
|
778
792
|
{ tool_approval_mode: get(toolApprovalMode), plan_mode: get(planMode) }
|
|
779
793
|
);
|
|
780
|
-
|
|
794
|
+
if (result.user_message && result.assistant_message) {
|
|
795
|
+
allMessages = [...allMessages, result.user_message, result.assistant_message];
|
|
796
|
+
currentMessageId = result.message_id;
|
|
797
|
+
}
|
|
781
798
|
} catch (e) {
|
|
782
799
|
console.error('[chat] edit-send error', e);
|
|
783
800
|
}
|
|
@@ -423,7 +423,16 @@ async def send_message(body: SendMessageRequest, request: Request):
|
|
|
423
423
|
regeneration_prompt=body.regeneration_prompt,
|
|
424
424
|
)
|
|
425
425
|
|
|
426
|
-
|
|
426
|
+
# Return the created messages so the frontend can append them
|
|
427
|
+
# directly — no separate GET needed, no client-side construction.
|
|
428
|
+
resp: dict = {
|
|
429
|
+
"chat_id": chat.id,
|
|
430
|
+
"message_id": assistant_msg.id,
|
|
431
|
+
"assistant_message": _message_dict(assistant_msg),
|
|
432
|
+
}
|
|
433
|
+
if parent_msg is None or parent_msg.role != "user":
|
|
434
|
+
resp["user_message"] = _message_dict(user_msg)
|
|
435
|
+
return resp
|
|
427
436
|
|
|
428
437
|
|
|
429
438
|
# ── Approve / reject a pending tool call ────────────────────
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cptr-0.1.6 → cptr-0.1.7}/cptr/frontend/src/lib/components/Admin/CreateConnectionModal.svelte
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cptr-0.1.6 → cptr-0.1.7}/dev.sh
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|