generated from nhcarrigan/template
style: fix lint errors and format issues
- Remove unused configStore import from CompactMode.svelte - Add key to each block in CompactMode.svelte - Fix useless escape characters in config.ts path masking - Apply Prettier formatting to StatusBar, Terminal, and +page.svelte
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import { get } from "svelte/store";
|
||||
import { claudeStore, isClaudeProcessing } from "$lib/stores/claude";
|
||||
import { characterState, characterInfo } from "$lib/stores/character";
|
||||
import { configStore, isStreamerMode } from "$lib/stores/config";
|
||||
import { isStreamerMode } from "$lib/stores/config";
|
||||
import { handleNewUserMessage } from "$lib/notifications/rules";
|
||||
import type { CharacterState, CharacterStateInfo } from "$lib/types/states";
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
<!-- Recent message preview -->
|
||||
<div class="message-preview">
|
||||
{#if recentMessages.length > 0}
|
||||
{#each recentMessages.slice(-1) as msg}
|
||||
{#each recentMessages.slice(-1) as msg (msg.content)}
|
||||
<div class="preview-message {msg.type}">
|
||||
{msg.content}
|
||||
</div>
|
||||
|
||||
@@ -217,7 +217,10 @@
|
||||
|
||||
<div class="flex items-center gap-3">
|
||||
{#if streamerModeActive}
|
||||
<div class="w-2.5 h-2.5 rounded-full bg-red-500 animate-pulse" title="Streamer mode active (Ctrl+Shift+S to toggle)"></div>
|
||||
<div
|
||||
class="w-2.5 h-2.5 rounded-full bg-red-500 animate-pulse"
|
||||
title="Streamer mode active (Ctrl+Shift+S to toggle)"
|
||||
></div>
|
||||
{/if}
|
||||
<button
|
||||
onclick={onToggleCompact}
|
||||
|
||||
@@ -194,9 +194,15 @@
|
||||
<span class="terminal-tool-name mr-2">[{line.toolName}]</span>
|
||||
{/if}
|
||||
{#if line.type === "assistant"}
|
||||
<Markdown content={maskPaths(line.content, hidePaths)} searchQuery={currentSearchQuery} />
|
||||
<Markdown
|
||||
content={maskPaths(line.content, hidePaths)}
|
||||
searchQuery={currentSearchQuery}
|
||||
/>
|
||||
{:else}
|
||||
<HighlightedText content={maskPaths(line.content, hidePaths)} searchQuery={currentSearchQuery} />
|
||||
<HighlightedText
|
||||
content={maskPaths(line.content, hidePaths)}
|
||||
searchQuery={currentSearchQuery}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
{/each}
|
||||
|
||||
@@ -214,8 +214,8 @@ export function maskPaths(text: string, hidePaths: boolean): string {
|
||||
// Match Unix paths like /home/username/... or /Users/username/...
|
||||
// and Windows paths like C:\Users\username\...
|
||||
return text
|
||||
.replace(/\/home\/([^\/\s]+)/g, "/home/****")
|
||||
.replace(/\/Users\/([^\/\s]+)/g, "/Users/****")
|
||||
.replace(/\/home\/([^/\s]+)/g, "/home/****")
|
||||
.replace(/\/Users\/([^/\s]+)/g, "/Users/****")
|
||||
.replace(/C:\\Users\\([^\\\s]+)/gi, "C:\\Users\\****")
|
||||
.replace(/~\//g, "****/");
|
||||
}
|
||||
|
||||
@@ -300,7 +300,9 @@
|
||||
|
||||
{#if compactModeActive}
|
||||
<!-- Compact mode: minimal widget interface -->
|
||||
<div class="app-container compact-app h-screen w-screen flex flex-col bg-[var(--bg-primary)] overflow-hidden">
|
||||
<div
|
||||
class="app-container compact-app h-screen w-screen flex flex-col bg-[var(--bg-primary)] overflow-hidden"
|
||||
>
|
||||
<CompactMode onExpand={exitCompactMode} />
|
||||
</div>
|
||||
{:else}
|
||||
|
||||
Reference in New Issue
Block a user