Skip to content

Commit

Permalink
Add user message shade (#882)
Browse files Browse the repository at this point in the history
  • Loading branch information
logancyang authored Dec 1, 2024
1 parent 53dcdf2 commit 3fab1a9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/VectorStoreManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,14 @@ class VectorStoreManager {
public async indexVaultToVectorStore(overwrite?: boolean): Promise<number> {
// Add check at the start of the method
await this.waitForInitialization();
if ((Platform.isMobile && getSettings().disableIndexOnMobile) || !this.oramaDb) {
if (Platform.isMobile && getSettings().disableIndexOnMobile) {
new Notice("Indexing is disabled on mobile devices");
return 0;
}
if (!this.oramaDb) {
new Notice("Orama database not found. Please make sure you have a working embedding model.");
throw new CustomError("Orama database not found.");
}

let rateLimitNoticeShown = false;

Expand Down
7 changes: 5 additions & 2 deletions src/components/chat-components/ChatInput.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { CustomModel, useChainType, useModelKey } from "@/aiParams";
import { ChainType } from "@/chainFactory";
import { useSettingsValue } from "@/settings/model";
import { AddImageModal } from "@/components/modals/AddImageModal";
import { ListPromptModal } from "@/components/modals/ListPromptModal";
import { NoteTitleModal } from "@/components/modals/NoteTitleModal";
import { ContextProcessor } from "@/contextProcessor";
import { CustomPromptProcessor } from "@/customPromptProcessor";
import { COPILOT_TOOL_NAMES } from "@/LLMProviders/intentAnalyzer";
import { Mention } from "@/mentions/Mention";
import { useSettingsValue } from "@/settings/model";
import { ChatMessage } from "@/sharedState";
import { getToolDescription } from "@/tools/toolManager";
import { extractNoteTitles } from "@/utils";
Expand Down Expand Up @@ -412,7 +412,10 @@ const ChatInput = forwardRef<{ focus: () => void }, ChatInputProps>(
<textarea
ref={textAreaRef}
className="chat-input-textarea"
placeholder="Ask anything. [[ for notes. / for custom prompts."
placeholder={
"Ask anything. [[ for notes. / for custom prompts. " +
(currentChain === ChainType.COPILOT_PLUS_CHAIN ? "@ for tools." : "")
}
value={inputMessage}
onChange={handleInputChange}
onKeyDown={handleKeyDown}
Expand Down
5 changes: 5 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -639,10 +639,15 @@ If your plugin does not need CSS, delete this file.
white-space: pre-wrap;
width: 95%;
color: var(--inline-title-color);
background-color: var(--background-primary-alt);
border-radius: 8px;
padding: 14px 10px 10px 10px;
}

.bot-message {
width: 95%;
border-radius: 8px;
padding: 14px 10px 10px 10px;
}

.copilot-command-modal {
Expand Down

0 comments on commit 3fab1a9

Please sign in to comment.