From 186c159ac033846d565411b3d78c8bcf34770123 Mon Sep 17 00:00:00 2001 From: rob rhyne Date: Fri, 31 Jan 2025 09:25:51 -0500 Subject: [PATCH] fix imports, improve contributing --- vscode/CONTRIBUTING.md | 2 ++ vscode/webviews/tabs/HistoryTab.tsx | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/vscode/CONTRIBUTING.md b/vscode/CONTRIBUTING.md index 18e3571193c2..478cb772598a 100644 --- a/vscode/CONTRIBUTING.md +++ b/vscode/CONTRIBUTING.md @@ -151,6 +151,8 @@ To open the Cody sidebar, autocomplete trace view, etc., when debugging starts, VS Code user settings. See [`src/dev/helpers.ts`](src/dev/helpers.ts) for a list of available options. +Run the web build from /web `pnpm install && pnpm dev` to reduce time spent waiting on extension builds. This is helpful for roughing in features, but you should always test the extensions in their proper environments. + ### Wasm tree sitter modules We use tree-sitter parser for a better code analysis in post completion process. In order to be able diff --git a/vscode/webviews/tabs/HistoryTab.tsx b/vscode/webviews/tabs/HistoryTab.tsx index e344fe95d519..2e7730d01f25 100644 --- a/vscode/webviews/tabs/HistoryTab.tsx +++ b/vscode/webviews/tabs/HistoryTab.tsx @@ -3,14 +3,15 @@ import { useExtensionAPI, useObservable } from '@sourcegraph/prompt-editor' import { HistoryIcon, MessageSquarePlusIcon, TrashIcon } from 'lucide-react' import type React from 'react' import { useCallback, useMemo, useState } from 'react' -import type { WebviewType } from '../../src/chat/protocol' -import { getRelativeChatPeriod } from '../../src/common/time-date' + import { LoadingDots } from '../chat/components/LoadingDots' import { Button } from '../components/shadcn/ui/button' +import { Input } from '../components/shadcn/ui/input' import { getVSCodeAPI } from '../utils/VSCodeApi' +import type { WebviewType } from '../../src/chat/protocol' +import { getRelativeChatPeriod } from '../../src/common/time-date' import { View } from './types' import { getCreateNewChatCommand } from './utils' -import { Input } from '../components/shadcn/ui/input' import styles from './HistoryTab.module.css' @@ -113,7 +114,7 @@ export const HistoryTabWithData: React.FC< {sortedChatsByPeriod.map(([period, chats]) => (
-

{period}

+

{period}

{chats.map(({ interactions, id }) => { const lastMessage = interactions[interactions.length - 1]?.humanMessage?.text?.trim() return (