refactor(ctx): remove dead code from ctx integration
This commit is contained in:
parent
f50811cfdb
commit
4f2b8b3183
6 changed files with 4 additions and 81 deletions
|
|
@ -1,12 +1,5 @@
|
|||
import { invoke } from '@tauri-apps/api/core';
|
||||
|
||||
export interface CtxProject {
|
||||
name: string;
|
||||
description: string;
|
||||
work_dir: string | null;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface CtxEntry {
|
||||
project: string;
|
||||
key: string;
|
||||
|
|
@ -28,10 +21,6 @@ export async function ctxRegisterProject(name: string, description: string, work
|
|||
return invoke('ctx_register_project', { name, description, workDir: workDir ?? null });
|
||||
}
|
||||
|
||||
export async function ctxListProjects(): Promise<CtxProject[]> {
|
||||
return invoke('ctx_list_projects');
|
||||
}
|
||||
|
||||
export async function ctxGetContext(project: string): Promise<CtxEntry[]> {
|
||||
return invoke('ctx_get_context', { project });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
dbMissing = false;
|
||||
} catch (e) {
|
||||
error = `${e}`;
|
||||
dbMissing = error.includes('not found');
|
||||
dbMissing = error.includes('not found'); // Coupled to Rust error text "ctx database not found"
|
||||
} finally {
|
||||
loading = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
<script lang="ts">
|
||||
import ContextPane from '../Context/ContextPane.svelte';
|
||||
</script>
|
||||
|
||||
<div class="context-tab">
|
||||
<ContextPane onExit={() => {}} />
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.context-tab {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
min-width: 22em;
|
||||
}
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue