From e500e3c9e9576f2533930e81f408ca48d22c7632 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=A6Ltorio?= Date: Fri, 4 Oct 2024 16:37:11 +0200 Subject: [PATCH] refactor prompts --- README.md | 6 +++--- src/aipane/components/HeroComboPrompts.tsx | 15 ++++++++++----- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6576700..8025d73 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ Please refer to the [PRIVACY.md](PRIVACY.md) file for information on data collec ## Contributing -We welcome contributions to the Groq Outlook Add-in! If you'd like to contribute, please follow these steps: +We welcome contributions to the AI Outlook Add-in! If you'd like to contribute, please follow these steps: 1. Fork the repository 2. Create your feature branch (`git checkout -b feature/AmazingFeature`) @@ -99,8 +99,8 @@ We welcome contributions to the Groq Outlook Add-in! If you'd like to contribute ## Support -If you encounter any issues or have questions about the Groq Outlook Add-in, please [open an issue](https://github.com/sctg-development/groq-outlook/issues) on our GitHub repository. +If you encounter any issues or have questions about the AI Outlook Add-in, please [open an issue](https://github.com/sctg-development/ai-outlook/issues) on our GitHub repository. --- -This project is not affiliated with or endorsed by Microsoft, Meta or Groq. It is an independent add-in developed to enhance the Outlook web experience using Groq's AI capabilities and Meta Llama models. +This project is not affiliated with or endorsed by Microsoft, Meta, SambaNova or Groq. It is an independent add-in developed to enhance the Outlook web experience using Groq's AI capabilities and Meta Llama models. diff --git a/src/aipane/components/HeroComboPrompts.tsx b/src/aipane/components/HeroComboPrompts.tsx index e4e4df5..5eb7924 100644 --- a/src/aipane/components/HeroComboPrompts.tsx +++ b/src/aipane/components/HeroComboPrompts.tsx @@ -6,9 +6,8 @@ import * as React from "react"; import { Dropdown, Label, makeStyles, Option, useId } from "@fluentui/react-components"; import { useState, useEffect } from "react"; -import config from "../../config.json"; // Assurez-vous que le chemin est correct import type { AIPrompt } from "../AIPrompt"; - +import config from "../../config.json"; interface HeroComboPromptsProps { onChange: (selectedValue: string) => void; } @@ -28,6 +27,8 @@ const useStyles = makeStyles({ }, }); +const prompts = config.prompts; + const HeroComboPrompts: React.FC = ({ onChange }) => { const styles = useStyles(); const inputId = useId("input"); @@ -41,6 +42,10 @@ const HeroComboPrompts: React.FC = ({ onChange }) => { }; useEffect(() => { + // prompts.forEach((prompt: AIPrompt) => { + // console.log(prompt.summary); + // }); + onChange(selectedValue); }, [selectedValue]); @@ -56,9 +61,9 @@ const HeroComboPrompts: React.FC = ({ onChange }) => { defaultSelectedOptions={[config.prompts[0].id]} defaultValue={config.prompts[0].summary} > - {config.prompts.map((option: AIPrompt) => ( - ))}