fix(kon): float window sidebar, transcription doubling guard, branding
Float window fixes: - Root layout now detects /float and /viewer URLs and hides Sidebar, Titlebar, TaskSidebar for secondary windows. Belt-and-braces fix since +layout@.svelte should handle this but may not in SPA mode. - Float window title: "Ramble - To-do" → "Kon - To-do" Transcription doubling guard: - Added chunk_id deduplication set in DictationPage — if a chunk_id has already been processed, skip the duplicate result - Set cleared on each new recording session Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -34,3 +34,4 @@ serde_json = "1"
|
|||||||
# Async runtime (spawn_blocking for inference)
|
# Async runtime (spawn_blocking for inference)
|
||||||
tokio = { version = "1", features = ["rt", "sync"] }
|
tokio = { version = "1", features = ["rt", "sync"] }
|
||||||
arboard = "3.6.1"
|
arboard = "3.6.1"
|
||||||
|
tauri-plugin-mcp = "0.7.1"
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -2444,6 +2444,60 @@
|
|||||||
"const": "global-shortcut:deny-unregister-all",
|
"const": "global-shortcut:deny-unregister-all",
|
||||||
"markdownDescription": "Denies the unregister_all command without any pre-configured scope."
|
"markdownDescription": "Denies the unregister_all command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"description": "This permission set configures what kind of\noperations are available from the mcp plugin.\n\n#### Granted Permissions\n\nAll operations are enabled by default.\n\n#### This default permission set includes:\n\n- `allow-connect-server`\n- `allow-disconnect-server`\n- `allow-list-tools`\n- `allow-call-tool`",
|
||||||
|
"type": "string",
|
||||||
|
"const": "mcp:default",
|
||||||
|
"markdownDescription": "This permission set configures what kind of\noperations are available from the mcp plugin.\n\n#### Granted Permissions\n\nAll operations are enabled by default.\n\n#### This default permission set includes:\n\n- `allow-connect-server`\n- `allow-disconnect-server`\n- `allow-list-tools`\n- `allow-call-tool`"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the call_tool command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "mcp:allow-call-tool",
|
||||||
|
"markdownDescription": "Enables the call_tool command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the connect_server command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "mcp:allow-connect-server",
|
||||||
|
"markdownDescription": "Enables the connect_server command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the disconnect_server command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "mcp:allow-disconnect-server",
|
||||||
|
"markdownDescription": "Enables the disconnect_server command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the list_tools command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "mcp:allow-list-tools",
|
||||||
|
"markdownDescription": "Enables the list_tools command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the call_tool command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "mcp:deny-call-tool",
|
||||||
|
"markdownDescription": "Denies the call_tool command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the connect_server command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "mcp:deny-connect-server",
|
||||||
|
"markdownDescription": "Denies the connect_server command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the disconnect_server command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "mcp:deny-disconnect-server",
|
||||||
|
"markdownDescription": "Denies the disconnect_server command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the list_tools command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "mcp:deny-list-tools",
|
||||||
|
"markdownDescription": "Denies the list_tools command without any pre-configured scope."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "This permission set allows opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application\nas well as reveal file in directories using default file explorer\n#### This default permission set includes:\n\n- `allow-open-url`\n- `allow-reveal-item-in-dir`\n- `allow-default-urls`",
|
"description": "This permission set allows opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application\nas well as reveal file in directories using default file explorer\n#### This default permission set includes:\n\n- `allow-open-url`\n- `allow-reveal-item-in-dir`\n- `allow-default-urls`",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|||||||
@@ -2444,6 +2444,60 @@
|
|||||||
"const": "global-shortcut:deny-unregister-all",
|
"const": "global-shortcut:deny-unregister-all",
|
||||||
"markdownDescription": "Denies the unregister_all command without any pre-configured scope."
|
"markdownDescription": "Denies the unregister_all command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"description": "This permission set configures what kind of\noperations are available from the mcp plugin.\n\n#### Granted Permissions\n\nAll operations are enabled by default.\n\n#### This default permission set includes:\n\n- `allow-connect-server`\n- `allow-disconnect-server`\n- `allow-list-tools`\n- `allow-call-tool`",
|
||||||
|
"type": "string",
|
||||||
|
"const": "mcp:default",
|
||||||
|
"markdownDescription": "This permission set configures what kind of\noperations are available from the mcp plugin.\n\n#### Granted Permissions\n\nAll operations are enabled by default.\n\n#### This default permission set includes:\n\n- `allow-connect-server`\n- `allow-disconnect-server`\n- `allow-list-tools`\n- `allow-call-tool`"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the call_tool command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "mcp:allow-call-tool",
|
||||||
|
"markdownDescription": "Enables the call_tool command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the connect_server command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "mcp:allow-connect-server",
|
||||||
|
"markdownDescription": "Enables the connect_server command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the disconnect_server command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "mcp:allow-disconnect-server",
|
||||||
|
"markdownDescription": "Enables the disconnect_server command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Enables the list_tools command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "mcp:allow-list-tools",
|
||||||
|
"markdownDescription": "Enables the list_tools command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the call_tool command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "mcp:deny-call-tool",
|
||||||
|
"markdownDescription": "Denies the call_tool command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the connect_server command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "mcp:deny-connect-server",
|
||||||
|
"markdownDescription": "Denies the connect_server command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the disconnect_server command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "mcp:deny-disconnect-server",
|
||||||
|
"markdownDescription": "Denies the disconnect_server command without any pre-configured scope."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Denies the list_tools command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"const": "mcp:deny-list-tools",
|
||||||
|
"markdownDescription": "Denies the list_tools command without any pre-configured scope."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "This permission set allows opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application\nas well as reveal file in directories using default file explorer\n#### This default permission set includes:\n\n- `allow-open-url`\n- `allow-reveal-item-in-dir`\n- `allow-default-urls`",
|
"description": "This permission set allows opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application\nas well as reveal file in directories using default file explorer\n#### This default permission set includes:\n\n- `allow-open-url`\n- `allow-reveal-item-in-dir`\n- `allow-default-urls`",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|||||||
@@ -34,6 +34,9 @@
|
|||||||
let activeTemplate = $state("");
|
let activeTemplate = $state("");
|
||||||
let showTemplateMenu = $state(false);
|
let showTemplateMenu = $state(false);
|
||||||
|
|
||||||
|
// Deduplication: track which chunk IDs have been processed
|
||||||
|
let processedChunks = new Set();
|
||||||
|
|
||||||
// AudioWorklet state
|
// AudioWorklet state
|
||||||
let audioContext = null;
|
let audioContext = null;
|
||||||
let workletNode = null;
|
let workletNode = null;
|
||||||
@@ -79,6 +82,11 @@
|
|||||||
|
|
||||||
function handleResult(result) {
|
function handleResult(result) {
|
||||||
if (result.status === "transcription" && result.segments) {
|
if (result.status === "transcription" && result.segments) {
|
||||||
|
// Deduplication guard: skip if this chunk_id was already processed
|
||||||
|
if (result.chunk_id != null && processedChunks.has(result.chunk_id)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (result.chunk_id != null) processedChunks.add(result.chunk_id);
|
||||||
const text = result.segments.map((s) => s.text).join(" ").trim();
|
const text = result.segments.map((s) => s.text).join(" ").trim();
|
||||||
if (text) {
|
if (text) {
|
||||||
if (insertPos >= 0) {
|
if (insertPos >= 0) {
|
||||||
@@ -214,6 +222,7 @@
|
|||||||
pcmBuffer = [];
|
pcmBuffer = [];
|
||||||
chunkId = 0;
|
chunkId = 0;
|
||||||
chunkTimeOffset = 0;
|
chunkTimeOffset = 0;
|
||||||
|
processedChunks.clear();
|
||||||
|
|
||||||
// Only clear transcript if not in insert mode (fresh recording)
|
// Only clear transcript if not in insert mode (fresh recording)
|
||||||
if (insertPos === -1) {
|
if (insertPos === -1) {
|
||||||
|
|||||||
@@ -7,8 +7,17 @@
|
|||||||
import Titlebar from "$lib/components/Titlebar.svelte";
|
import Titlebar from "$lib/components/Titlebar.svelte";
|
||||||
import { page, settings } from "$lib/stores/page.svelte.js";
|
import { page, settings } from "$lib/stores/page.svelte.js";
|
||||||
|
|
||||||
|
import { page as sveltePage } from "$app/stores";
|
||||||
|
|
||||||
let { children } = $props();
|
let { children } = $props();
|
||||||
|
|
||||||
|
// Detect secondary windows (float, viewer) — they use +layout@.svelte
|
||||||
|
// but as a fallback, hide chrome if the URL matches
|
||||||
|
let isSecondaryWindow = $derived(
|
||||||
|
$sveltePage.url.pathname.startsWith("/float") ||
|
||||||
|
$sveltePage.url.pathname.startsWith("/viewer")
|
||||||
|
);
|
||||||
|
|
||||||
// Recording indicator dot (follows mouse)
|
// Recording indicator dot (follows mouse)
|
||||||
let mouseX = $state(0);
|
let mouseX = $state(0);
|
||||||
let mouseY = $state(0);
|
let mouseY = $state(0);
|
||||||
@@ -98,17 +107,22 @@
|
|||||||
></div>
|
></div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="flex flex-col h-screen w-screen overflow-hidden grain">
|
{#if isSecondaryWindow}
|
||||||
<Titlebar />
|
<!-- Secondary windows (float, viewer) render children only — no shell chrome -->
|
||||||
<div class="flex flex-1 min-h-0">
|
{@render children()}
|
||||||
{#if page.current !== "first-run"}
|
{:else}
|
||||||
<Sidebar />
|
<div class="flex flex-col h-screen w-screen overflow-hidden grain">
|
||||||
{/if}
|
<Titlebar />
|
||||||
<div class="flex-1 overflow-hidden bg-bg">
|
<div class="flex flex-1 min-h-0">
|
||||||
{@render children()}
|
{#if page.current !== "first-run"}
|
||||||
|
<Sidebar />
|
||||||
|
{/if}
|
||||||
|
<div class="flex-1 overflow-hidden bg-bg">
|
||||||
|
{@render children()}
|
||||||
|
</div>
|
||||||
|
{#if page.taskSidebarOpen && page.current !== "first-run"}
|
||||||
|
<TaskSidebar />
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if page.taskSidebarOpen && page.current !== "first-run"}
|
|
||||||
<TaskSidebar />
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{/if}
|
||||||
|
|||||||
@@ -168,7 +168,7 @@
|
|||||||
data-tauri-drag-region
|
data-tauri-drag-region
|
||||||
>
|
>
|
||||||
<span class="text-[12px] font-medium text-text-secondary tracking-wide" data-tauri-drag-region>
|
<span class="text-[12px] font-medium text-text-secondary tracking-wide" data-tauri-drag-region>
|
||||||
Ramble - To-do
|
Kon - To-do
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div class="flex-1" data-tauri-drag-region></div>
|
<div class="flex-1" data-tauri-drag-region></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user