mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
Add initial commit for local repos, filter sessions by directory, remove unused priority indicator
This commit is contained in:
1 parent
75430230c1
commit
8061437304
3 files changed
+8
-11
No files matched your search
@@ -146,6 +146,8 @@ export async function initLocalRepo(
|
||||
|
||||
await executeCommand(['git', 'init'], { cwd: fullPath })
|
||||
|
||||
await executeCommand(['git', '-C', fullPath, 'commit', '--allow-empty', '-m', 'Initial commit'])
|
||||
|
||||
if (branch && branch !== 'main') {
|
||||
await executeCommand(['git', '-C', fullPath, 'checkout', '-b', branch])
|
||||
}
|
||||
|
||||
@@ -12,12 +12,6 @@ export function TodoItem({ todo, compact = false }: TodoItemProps) {
|
||||
const isCompleted = todo.status === 'completed'
|
||||
const isInProgress = todo.status === 'in_progress'
|
||||
|
||||
const priorityColor = todo.priority === 'high'
|
||||
? 'bg-red-500'
|
||||
: todo.priority === 'medium'
|
||||
? 'bg-yellow-500'
|
||||
: 'bg-blue-400'
|
||||
|
||||
return (
|
||||
<div className={`flex items-center gap-1.5 ${compact ? 'py-0.5 text-xs' : 'py-1 text-sm'} pl-0.5`}>
|
||||
{isCompleted ? (
|
||||
@@ -27,9 +21,6 @@ export function TodoItem({ todo, compact = false }: TodoItemProps) {
|
||||
) : (
|
||||
<Circle className={`${compact ? 'w-3 h-3' : 'w-3.5 h-3.5'} text-muted-foreground flex-shrink-0`} />
|
||||
)}
|
||||
{todo.priority && (
|
||||
<span className={`w-1.5 h-1.5 rounded-full ${priorityColor} flex-shrink-0`} />
|
||||
)}
|
||||
<span
|
||||
className={`flex-1 min-w-0 truncate ${
|
||||
isInProgress
|
||||
|
||||
@@ -36,7 +36,11 @@ export const SessionList = ({
|
||||
const filteredSessions = useMemo(() => {
|
||||
if (!sessions) return [];
|
||||
|
||||
const rootSessions = sessions.filter((session) => !session.parentID);
|
||||
const rootSessions = sessions.filter((session) => {
|
||||
if (session.parentID) return false;
|
||||
if (directory && session.directory && session.directory !== directory) return false;
|
||||
return true;
|
||||
});
|
||||
|
||||
if (!searchQuery.trim()) return rootSessions;
|
||||
|
||||
@@ -44,7 +48,7 @@ export const SessionList = ({
|
||||
return rootSessions.filter((session) =>
|
||||
(session.title || "Untitled Session").toLowerCase().includes(query),
|
||||
);
|
||||
}, [sessions, searchQuery]);
|
||||
}, [sessions, searchQuery, directory]);
|
||||
|
||||
if (isLoading) {
|
||||
return <div className="p-4 text-sm text-muted-foreground">Loading sessions...</div>;
|
||||
|
||||
Reference in new issue
Block a user