mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 15:07:55 -05:00
feat(search): added search to variables & credentials, fixed missing docs
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -63,7 +63,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@main
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
|
||||
@@ -33,21 +33,6 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
The File Parser tool provides a powerful way to extract and process content from various file formats, making it easy to incorporate document data into your agent workflows. This tool supports multiple file formats and can handle files up to 200MB in size.
|
||||
|
||||
With the File Parser, you can:
|
||||
|
||||
- **Process multiple file formats**: Extract text from PDFs, CSVs, Word documents (DOCX), text files, and more
|
||||
- **Handle large files**: Process documents up to 200MB in size
|
||||
- **Parse files from URLs**: Directly extract content from files hosted online by providing their URLs
|
||||
- **Process multiple files at once**: Upload and parse several files in a single operation
|
||||
- **Extract structured data**: Maintain formatting and structure from the original documents when possible
|
||||
|
||||
The File Parser tool is particularly useful for scenarios where your agents need to work with document content, such as analyzing reports, extracting data from spreadsheets, or processing text from various document sources. It simplifies the process of making document content available to your agents, allowing them to work with information stored in files just as easily as with direct text input.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Upload and extract contents from structured file formats including PDFs, CSV spreadsheets, and Word documents (DOCX). ${
|
||||
@@ -79,7 +64,11 @@ This tool does not produce any outputs.
|
||||
|
||||
## Block Configuration
|
||||
|
||||
No configuration parameters required.
|
||||
### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `inputMethod` | string | No | |
|
||||
|
||||
|
||||
|
||||
|
||||
102
apps/docs/content/docs/tools/file.mdx
Normal file
102
apps/docs/content/docs/tools/file.mdx
Normal file
@@ -0,0 +1,102 @@
|
||||
---
|
||||
title: File
|
||||
description: Read and parse multiple files
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="file"
|
||||
color="#40916C"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
|
||||
|
||||
viewBox='0 0 23 28'
|
||||
fill='none'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
>
|
||||
<path
|
||||
d='M8 15.2H15.2M8 20H11.6M2 4.4V23.6C2 24.2365 2.25286 24.847 2.70294 25.2971C3.15303 25.7471 3.76348 26 4.4 26H18.8C19.4365 26 20.047 25.7471 20.4971 25.2971C20.9471 24.847 21.2 24.2365 21.2 23.6V9.6104C21.2 9.29067 21.136 8.97417 21.012 8.67949C20.8879 8.38481 20.7062 8.11789 20.4776 7.8944L15.1496 2.684C14.7012 2.24559 14.0991 2.00008 13.472 2H4.4C3.76348 2 3.15303 2.25286 2.70294 2.70294C2.25286 3.15303 2 3.76348 2 4.4Z'
|
||||
stroke='currentColor'
|
||||
strokeWidth='2.25'
|
||||
strokeLinecap='round'
|
||||
strokeLinejoin='round'
|
||||
/>
|
||||
<path
|
||||
d='M14 2V6.8C14 7.43652 14.2529 8.04697 14.7029 8.49706C15.153 8.94714 15.7635 9.2 16.4 9.2H21.2'
|
||||
stroke='currentColor'
|
||||
strokeWidth='2.25'
|
||||
strokeLinejoin='round'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
The File Parser tool provides a powerful way to extract and process content from various file formats, making it easy to incorporate document data into your agent workflows. This tool supports multiple file formats and can handle files up to 200MB in size.
|
||||
|
||||
With the File Parser, you can:
|
||||
|
||||
- **Process multiple file formats**: Extract text from PDFs, CSVs, Word documents (DOCX), text files, and more
|
||||
- **Handle large files**: Process documents up to 200MB in size
|
||||
- **Parse files from URLs**: Directly extract content from files hosted online by providing their URLs
|
||||
- **Process multiple files at once**: Upload and parse several files in a single operation
|
||||
- **Extract structured data**: Maintain formatting and structure from the original documents when possible
|
||||
|
||||
The File Parser tool is particularly useful for scenarios where your agents need to work with document content, such as analyzing reports, extracting data from spreadsheets, or processing text from various document sources. It simplifies the process of making document content available to your agents, allowing them to work with information stored in files just as easily as with direct text input.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Upload and extract contents from structured file formats including PDFs, CSV spreadsheets, and Word documents (DOCX). ${
|
||||
shouldEnableURLInput
|
||||
? 'You can either provide a URL to a file or upload files directly. '
|
||||
: 'Upload files directly. '
|
||||
}Specialized parsers extract text and metadata from each format. You can upload multiple files at once and access them individually or as a combined document.
|
||||
|
||||
|
||||
|
||||
## Tools
|
||||
|
||||
### `file_parser`
|
||||
|
||||
Parse one or more uploaded files or files from URLs (text, PDF, CSV, images, etc.)
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `filePath` | string | Yes | Path to the file\(s\). Can be a single path, URL, or an array of paths. |
|
||||
| `fileType` | string | No | Type of file to parse \(auto-detected if not specified\) |
|
||||
|
||||
#### Output
|
||||
|
||||
This tool does not produce any outputs.
|
||||
|
||||
|
||||
|
||||
## Block Configuration
|
||||
|
||||
### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `inputMethod` | string | No | |
|
||||
|
||||
|
||||
|
||||
### Outputs
|
||||
|
||||
| Output | Type | Description |
|
||||
| ------ | ---- | ----------- |
|
||||
| `response` | object | Output from response |
|
||||
| ↳ `files` | json | files of the response |
|
||||
| ↳ `combinedContent` | string | combinedContent of the response |
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `tools`
|
||||
- Type: `file`
|
||||
@@ -10,6 +10,7 @@
|
||||
"dropdown",
|
||||
"elevenlabs",
|
||||
"exa",
|
||||
"file",
|
||||
"firecrawl",
|
||||
"github",
|
||||
"gmail",
|
||||
@@ -25,6 +26,7 @@
|
||||
"mem0",
|
||||
"memory",
|
||||
"microsoft_teams",
|
||||
"mistral_parse",
|
||||
"notion",
|
||||
"openai",
|
||||
"outlook",
|
||||
|
||||
@@ -61,9 +61,9 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
y2='394.2607'
|
||||
gradientTransform='matrix(1 0 0 -1 0 2075.3333)'
|
||||
>
|
||||
<stop offset='0' stop-color='#5a62c3' />
|
||||
<stop offset='.5' stop-color='#4d55bd' />
|
||||
<stop offset='1' stop-color='#3940ab' />
|
||||
<stop offset='0' stopColor='#5a62c3' />
|
||||
<stop offset='.5' stopColor='#4d55bd' />
|
||||
<stop offset='1' stopColor='#3940ab' />
|
||||
</linearGradient>
|
||||
<path
|
||||
fill='url(#a)'
|
||||
|
||||
137
apps/docs/content/docs/tools/mistral_parse.mdx
Normal file
137
apps/docs/content/docs/tools/mistral_parse.mdx
Normal file
@@ -0,0 +1,137 @@
|
||||
---
|
||||
title: Mistral Parser
|
||||
description: Extract text from PDF documents
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="mistral_parse"
|
||||
color="#000000"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
|
||||
|
||||
viewBox='1 0.5 24 22'
|
||||
fill='none'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
preserveAspectRatio='xMidYMid meet'
|
||||
>
|
||||
<g clipPath='url(#clip0_1621_58)'>
|
||||
<path d='M17.4541 0H21.8177V4.39481H17.4541V0Z' fill='black' />
|
||||
<path d='M19.6367 0H24.0003V4.39481H19.6367V0Z' fill='#F7D046' />
|
||||
<path
|
||||
d='M0 0H4.36359V4.39481H0V0ZM0 4.39481H4.36359V8.78961H0V4.39481ZM0 8.78971H4.36359V13.1845H0V8.78971ZM0 13.1845H4.36359V17.5793H0V13.1845ZM0 17.5794H4.36359V21.9742H0V17.5794Z'
|
||||
fill='black'
|
||||
/>
|
||||
<path d='M2.18164 0H6.54523V4.39481H2.18164V0Z' fill='#F7D046' />
|
||||
<path
|
||||
d='M19.6362 4.39478H23.9998V8.78958H19.6362V4.39478ZM2.18164 4.39478H6.54523V8.78958H2.18164V4.39478Z'
|
||||
fill='#F2A73B'
|
||||
/>
|
||||
<path d='M13.0908 4.39478H17.4544V8.78958H13.0908V4.39478Z' fill='black' />
|
||||
<path
|
||||
d='M15.2732 4.39478H19.6368V8.78958H15.2732V4.39478ZM6.5459 4.39478H10.9095V8.78958H6.5459V4.39478Z'
|
||||
fill='#F2A73B'
|
||||
/>
|
||||
<path
|
||||
d='M10.9096 8.78979H15.2732V13.1846H10.9096V8.78979ZM15.2732 8.78979H19.6368V13.1846H15.2732V8.78979ZM6.5459 8.78979H10.9096V13.1846H6.5459V8.78979Z'
|
||||
fill='#EE792F'
|
||||
/>
|
||||
<path d='M8.72754 13.1846H13.0911V17.5794H8.72754V13.1846Z' fill='black' />
|
||||
<path d='M10.9092 13.1846H15.2728V17.5794H10.9092V13.1846Z' fill='#EB5829' />
|
||||
<path
|
||||
d='M19.6362 8.78979H23.9998V13.1846H19.6362V8.78979ZM2.18164 8.78979H6.54523V13.1846H2.18164V8.78979Z'
|
||||
fill='#EE792F'
|
||||
/>
|
||||
<path d='M17.4541 13.1846H21.8177V17.5794H17.4541V13.1846Z' fill='black' />
|
||||
<path d='M19.6367 13.1846H24.0003V17.5794H19.6367V13.1846Z' fill='#EB5829' />
|
||||
<path d='M17.4541 17.5793H21.8177V21.9742H17.4541V17.5793Z' fill='black' />
|
||||
<path d='M2.18164 13.1846H6.54523V17.5794H2.18164V13.1846Z' fill='#EB5829' />
|
||||
<path
|
||||
d='M19.6362 17.5793H23.9998V21.9742H19.6362V17.5793ZM2.18164 17.5793H6.54523V21.9742H2.18164V17.5793Z'
|
||||
fill='#EA3326'
|
||||
/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id='clip0_1621_58'>
|
||||
<rect fill='white' />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
The Mistral Parse tool provides a powerful way to extract and process content from PDF documents using [Mistral's OCR API](https://mistral.ai/). This tool leverages advanced optical character recognition to accurately extract text and structure from PDF files, making it easy to incorporate document data into your agent workflows.
|
||||
|
||||
With the Mistral Parse tool, you can:
|
||||
|
||||
- **Extract text from PDFs**: Accurately convert PDF content to text, markdown, or JSON formats
|
||||
- **Process PDFs from URLs**: Directly extract content from PDFs hosted online by providing their URLs
|
||||
- **Maintain document structure**: Preserve formatting, tables, and layout from the original PDFs
|
||||
- **Extract images**: Optionally include embedded images from the PDFs
|
||||
- **Select specific pages**: Process only the pages you need from multi-page documents
|
||||
|
||||
The Mistral Parse tool is particularly useful for scenarios where your agents need to work with PDF content, such as analyzing reports, extracting data from forms, or processing text from scanned documents. It simplifies the process of making PDF content available to your agents, allowing them to work with information stored in PDFs just as easily as with direct text input.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Extract text and structure from PDF documents using Mistral's OCR API.${
|
||||
shouldEnableFileUpload
|
||||
? ' Either enter a URL to a PDF document or upload a PDF file directly.'
|
||||
: ' Enter a URL to a PDF document (.pdf extension required).'
|
||||
} Configure processing options and get the content in your preferred format. For URLs, they must be publicly accessible and point to a valid PDF file. Note: Google Drive, Dropbox, and other cloud storage links are not supported; use a direct download URL from a web server instead.
|
||||
|
||||
|
||||
|
||||
## Tools
|
||||
|
||||
### `mistral_parser`
|
||||
|
||||
Parse PDF documents using Mistral OCR API
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `filePath` | string | Yes | URL to a PDF document to be processed |
|
||||
| `fileUpload` | object | No | File upload data from file-upload component |
|
||||
| `resultType` | string | No | Type of parsed result \(markdown, text, or json\). Defaults to markdown. |
|
||||
| `apiKey` | string | Yes | Mistral API key \(MISTRAL_API_KEY\) |
|
||||
| `includeImageBase64` | boolean | No | Include base64-encoded images in the response |
|
||||
| `pages` | array | No | Specific pages to process \(array of page numbers, starting from 0\) |
|
||||
| `imageLimit` | number | No | Maximum number of images to extract from the PDF |
|
||||
| `imageMinSize` | number | No | Minimum height and width of images to extract from the PDF |
|
||||
|
||||
#### Output
|
||||
|
||||
This tool does not produce any outputs.
|
||||
|
||||
|
||||
|
||||
## Block Configuration
|
||||
|
||||
### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `inputMethod` | string | No | |
|
||||
|
||||
|
||||
|
||||
### Outputs
|
||||
|
||||
| Output | Type | Description |
|
||||
| ------ | ---- | ----------- |
|
||||
| `response` | object | Output from response |
|
||||
| ↳ `content` | string | content of the response |
|
||||
| ↳ `metadata` | json | metadata of the response |
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `tools`
|
||||
- Type: `mistral_parse`
|
||||
@@ -11,43 +11,113 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
version="1.1"
|
||||
id="Livello_1"
|
||||
x="0px" y="0px"
|
||||
viewBox="0 0 1831.085 1703.335"
|
||||
enable-background="new 0 0 1831.085 1703.335"
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
version='1.1'
|
||||
id='Livello_1'
|
||||
x='0px'
|
||||
y='0px'
|
||||
viewBox='0 0 1831.085 1703.335'
|
||||
enableBackground='new 0 0 1831.085 1703.335'
|
||||
>
|
||||
<path
|
||||
fill='#0A2767'
|
||||
d='M1831.083,894.25c0.1-14.318-7.298-27.644-19.503-35.131h-0.213l-0.767-0.426l-634.492-375.585 c-2.74-1.851-5.583-3.543-8.517-5.067c-24.498-12.639-53.599-12.639-78.098,0c-2.934,1.525-5.777,3.216-8.517,5.067L446.486,858.693 l-0.766,0.426c-19.392,12.059-25.337,37.556-13.278,56.948c3.553,5.714,8.447,10.474,14.257,13.868l634.492,375.585 c2.749,1.835,5.592,3.527,8.517,5.068c24.498,12.639,53.599,12.639,78.098,0c2.925-1.541,5.767-3.232,8.517-5.068l634.492-375.585 C1823.49,922.545,1831.228,908.923,1831.083,894.25z'
|
||||
/>
|
||||
<path
|
||||
fill='#0364B8'
|
||||
d='M520.453,643.477h416.38v381.674h-416.38V643.477z M1745.917,255.5V80.908 c1-43.652-33.552-79.862-77.203-80.908H588.204C544.552,1.046,510,37.256,511,80.908V255.5l638.75,170.333L1745.917,255.5z'
|
||||
/>
|
||||
<path fill='#0078D4' d='M511,255.5h425.833v383.25H511V255.5z' />
|
||||
<path
|
||||
fill='#28A8EA'
|
||||
d='M1362.667,255.5H936.833v383.25L1362.667,1022h383.25V638.75L1362.667,255.5z'
|
||||
/>
|
||||
<path fill='#0078D4' d='M936.833,638.75h425.833V1022H936.833V638.75z' />
|
||||
<path fill='#0364B8' d='M936.833,1022h425.833v383.25H936.833V1022z' />
|
||||
<path fill='#14447D' d='M520.453,1025.151h416.38v346.969h-416.38V1025.151z' />
|
||||
<path fill='#0078D4' d='M1362.667,1022h383.25v383.25h-383.25V1022z' />
|
||||
<linearGradient
|
||||
id='SVGID_1_'
|
||||
gradientUnits='userSpaceOnUse'
|
||||
x1='1128.4584'
|
||||
y1='811.0833'
|
||||
x2='1128.4584'
|
||||
y2='1.9982'
|
||||
gradientTransform='matrix(1 0 0 -1 0 1705.3334)'
|
||||
>
|
||||
<path fill="#0A2767" d="M1831.083,894.25c0.1-14.318-7.298-27.644-19.503-35.131h-0.213l-0.767-0.426l-634.492-375.585 c-2.74-1.851-5.583-3.543-8.517-5.067c-24.498-12.639-53.599-12.639-78.098,0c-2.934,1.525-5.777,3.216-8.517,5.067L446.486,858.693 l-0.766,0.426c-19.392,12.059-25.337,37.556-13.278,56.948c3.553,5.714,8.447,10.474,14.257,13.868l634.492,375.585 c2.749,1.835,5.592,3.527,8.517,5.068c24.498,12.639,53.599,12.639,78.098,0c2.925-1.541,5.767-3.232,8.517-5.068l634.492-375.585 C1823.49,922.545,1831.228,908.923,1831.083,894.25z"/>
|
||||
<path fill="#0364B8" d="M520.453,643.477h416.38v381.674h-416.38V643.477z M1745.917,255.5V80.908 c1-43.652-33.552-79.862-77.203-80.908H588.204C544.552,1.046,510,37.256,511,80.908V255.5l638.75,170.333L1745.917,255.5z"/>
|
||||
<path fill="#0078D4" d="M511,255.5h425.833v383.25H511V255.5z"/>
|
||||
<path fill="#28A8EA" d="M1362.667,255.5H936.833v383.25L1362.667,1022h383.25V638.75L1362.667,255.5z"/>
|
||||
<path fill="#0078D4" d="M936.833,638.75h425.833V1022H936.833V638.75z"/>
|
||||
<path fill="#0364B8" d="M936.833,1022h425.833v383.25H936.833V1022z"/>
|
||||
<path fill="#14447D" d="M520.453,1025.151h416.38v346.969h-416.38V1025.151z"/>
|
||||
<path fill="#0078D4" d="M1362.667,1022h383.25v383.25h-383.25V1022z"/>
|
||||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="1128.4584" y1="811.0833" x2="1128.4584" y2="1.9982" gradientTransform="matrix(1 0 0 -1 0 1705.3334)">
|
||||
<stop offset="0" style={{ stopColor: '#35B8F1' }} />
|
||||
<stop offset="1" style={{ stopColor: '#28A8EA' }} />
|
||||
<stop offset='0' style={{ stopColor: '#35B8F1' }} />
|
||||
<stop offset='1' style={{ stopColor: '#28A8EA' }} />
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_1_)" d="M1811.58,927.593l-0.809,0.426l-634.492,356.848c-2.768,1.703-5.578,3.321-8.517,4.769 c-10.777,5.132-22.481,8.029-34.407,8.517l-34.663-20.27c-2.929-1.47-5.773-3.105-8.517-4.897L447.167,906.003h-0.298 l-21.036-11.753v722.384c0.328,48.196,39.653,87.006,87.849,86.7h1230.914c0.724,0,1.363-0.341,2.129-0.341 c10.18-0.651,20.216-2.745,29.808-6.217c4.145-1.756,8.146-3.835,11.966-6.217c2.853-1.618,7.75-5.152,7.75-5.152 c21.814-16.142,34.726-41.635,34.833-68.772V894.25C1831.068,908.067,1823.616,920.807,1811.58,927.593z"/>
|
||||
<path opacity="0.5" fill="#0A2767" enable-background="new " d="M1797.017,891.397v44.287l-663.448,456.791L446.699,906.301 c0-0.235-0.191-0.426-0.426-0.426l0,0l-63.023-37.899v-31.938l25.976-0.426l54.932,31.512l1.277,0.426l4.684,2.981 c0,0,645.563,368.346,647.267,369.197l24.698,14.478c2.129-0.852,4.258-1.703,6.813-2.555 c1.278-0.852,640.879-360.681,640.879-360.681L1797.017,891.397z"/>
|
||||
<path fill="#1490DF" d="M1811.58,927.593l-0.809,0.468l-634.492,356.848c-2.768,1.703-5.578,3.321-8.517,4.769 c-24.641,12.038-53.457,12.038-78.098,0c-2.918-1.445-5.76-3.037-8.517-4.769L446.657,928.061l-0.766-0.468 c-12.25-6.642-19.93-19.409-20.057-33.343v722.384c0.305,48.188,39.616,87.004,87.803,86.7c0.001,0,0.002,0,0.004,0h1229.636 c48.188,0.307,87.5-38.509,87.807-86.696c0-0.001,0-0.002,0-0.004V894.25C1831.068,908.067,1823.616,920.807,1811.58,927.593z"/>
|
||||
<path opacity="0.1" enable-background="new " d="M1185.52,1279.629l-9.496,5.323c-2.752,1.752-5.595,3.359-8.517,4.812 c-10.462,5.135-21.838,8.146-33.47,8.857l241.405,285.479l421.107,101.476c11.539-8.716,20.717-20.178,26.7-33.343L1185.52,1279.629 z"/>
|
||||
<path opacity="0.05" enable-background="new " d="M1228.529,1255.442l-52.505,29.51c-2.752,1.752-5.595,3.359-8.517,4.812 c-10.462,5.135-21.838,8.146-33.47,8.857l113.101,311.838l549.538,74.989c21.649-16.254,34.394-41.743,34.407-68.815v-9.326 L1228.529,1255.442z"/>
|
||||
<path fill="#28A8EA" d="M514.833,1703.333h1228.316c18.901,0.096,37.335-5.874,52.59-17.033l-697.089-408.331 c-2.929-1.47-5.773-3.105-8.517-4.897L447.125,906.088h-0.298l-20.993-11.838v719.914 C425.786,1663.364,465.632,1703.286,514.833,1703.333C514.832,1703.333,514.832,1703.333,514.833,1703.333z"/>
|
||||
<path opacity="0.1" enable-background="new " d="M1022,418.722v908.303c-0.076,31.846-19.44,60.471-48.971,72.392 c-9.148,3.931-19,5.96-28.957,5.962H425.833V383.25H511v-42.583h433.073C987.092,340.83,1021.907,375.702,1022,418.722z"/>
|
||||
<path opacity="0.2" enable-background="new " d="M979.417,461.305v908.302c0.107,10.287-2.074,20.469-6.388,29.808 c-11.826,29.149-40.083,48.273-71.54,48.417H425.833V383.25h475.656c12.356-0.124,24.533,2.958,35.344,8.943 C962.937,405.344,979.407,432.076,979.417,461.305z"/>
|
||||
<path opacity="0.2" enable-background="new " d="M979.417,461.305v823.136c-0.208,43-34.928,77.853-77.927,78.225H425.833V383.25 h475.656c12.356-0.124,24.533,2.958,35.344,8.943C962.937,405.344,979.407,432.076,979.417,461.305z"/>
|
||||
<path opacity="0.2" enable-background="new " d="M936.833,461.305v823.136c-0.046,43.067-34.861,78.015-77.927,78.225H425.833 V383.25h433.072c43.062,0.023,77.951,34.951,77.927,78.013C936.833,461.277,936.833,461.291,936.833,461.305z"/>
|
||||
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="162.7469" y1="1383.0741" x2="774.0864" y2="324.2592" gradientTransform="matrix(1 0 0 -1 0 1705.3334)">
|
||||
<stop offset="0" style={{ stopColor: '#1784D9' }} />
|
||||
<stop offset="0.5" style={{ stopColor: '#107AD5' }} />
|
||||
<stop offset="1" style={{ stopColor: '#0A63C9' }} />
|
||||
<path
|
||||
fill='url(#SVGID_1_)'
|
||||
d='M1811.58,927.593l-0.809,0.426l-634.492,356.848c-2.768,1.703-5.578,3.321-8.517,4.769 c-10.777,5.132-22.481,8.029-34.407,8.517l-34.663-20.27c-2.929-1.47-5.773-3.105-8.517-4.897L447.167,906.003h-0.298 l-21.036-11.753v722.384c0.328,48.196,39.653,87.006,87.849,86.7h1230.914c0.724,0,1.363-0.341,2.129-0.341 c10.18-0.651,20.216-2.745,29.808-6.217c4.145-1.756,8.146-3.835,11.966-6.217c2.853-1.618,7.75-5.152,7.75-5.152 c21.814-16.142,34.726-41.635,34.833-68.772V894.25C1831.068,908.067,1823.616,920.807,1811.58,927.593z'
|
||||
/>
|
||||
<path
|
||||
opacity='0.5'
|
||||
fill='#0A2767'
|
||||
enableBackground='new '
|
||||
d='M1797.017,891.397v44.287l-663.448,456.791L446.699,906.301 c0-0.235-0.191-0.426-0.426-0.426l0,0l-63.023-37.899v-31.938l25.976-0.426l54.932,31.512l1.277,0.426l4.684,2.981 c0,0,645.563,368.346,647.267,369.197l24.698,14.478c2.129-0.852,4.258-1.703,6.813-2.555 c1.278-0.852,640.879-360.681,640.879-360.681L1797.017,891.397z'
|
||||
/>
|
||||
<path
|
||||
fill='#1490DF'
|
||||
d='M1811.58,927.593l-0.809,0.468l-634.492,356.848c-2.768,1.703-5.578,3.321-8.517,4.769 c-24.641,12.038-53.457,12.038-78.098,0c-2.918-1.445-5.76-3.037-8.517-4.769L446.657,928.061l-0.766-0.468 c-12.25-6.642-19.93-19.409-20.057-33.343v722.384c0.305,48.188,39.616,87.004,87.803,86.7c0.001,0,0.002,0,0.004,0h1229.636 c48.188,0.307,87.5-38.509,87.807-86.696c0-0.001,0-0.002,0-0.004V894.25C1831.068,908.067,1823.616,920.807,1811.58,927.593z'
|
||||
/>
|
||||
<path
|
||||
opacity='0.1'
|
||||
enableBackground='new '
|
||||
d='M1185.52,1279.629l-9.496,5.323c-2.752,1.752-5.595,3.359-8.517,4.812 c-10.462,5.135-21.838,8.146-33.47,8.857l241.405,285.479l421.107,101.476c11.539-8.716,20.717-20.178,26.7-33.343L1185.52,1279.629 z'
|
||||
/>
|
||||
<path
|
||||
opacity='0.05'
|
||||
enableBackground='new '
|
||||
d='M1228.529,1255.442l-52.505,29.51c-2.752,1.752-5.595,3.359-8.517,4.812 c-10.462,5.135-21.838,8.146-33.47,8.857l113.101,311.838l549.538,74.989c21.649-16.254,34.394-41.743,34.407-68.815v-9.326 L1228.529,1255.442z'
|
||||
/>
|
||||
<path
|
||||
fill='#28A8EA'
|
||||
d='M514.833,1703.333h1228.316c18.901,0.096,37.335-5.874,52.59-17.033l-697.089-408.331 c-2.929-1.47-5.773-3.105-8.517-4.897L447.125,906.088h-0.298l-20.993-11.838v719.914 C425.786,1663.364,465.632,1703.286,514.833,1703.333C514.832,1703.333,514.832,1703.333,514.833,1703.333z'
|
||||
/>
|
||||
<path
|
||||
opacity='0.1'
|
||||
enableBackground='new '
|
||||
d='M1022,418.722v908.303c-0.076,31.846-19.44,60.471-48.971,72.392 c-9.148,3.931-19,5.96-28.957,5.962H425.833V383.25H511v-42.583h433.073C987.092,340.83,1021.907,375.702,1022,418.722z'
|
||||
/>
|
||||
<path
|
||||
opacity='0.2'
|
||||
enableBackground='new '
|
||||
d='M979.417,461.305v908.302c0.107,10.287-2.074,20.469-6.388,29.808 c-11.826,29.149-40.083,48.273-71.54,48.417H425.833V383.25h475.656c12.356-0.124,24.533,2.958,35.344,8.943 C962.937,405.344,979.407,432.076,979.417,461.305z'
|
||||
/>
|
||||
<path
|
||||
opacity='0.2'
|
||||
enableBackground='new '
|
||||
d='M979.417,461.305v823.136c-0.208,43-34.928,77.853-77.927,78.225H425.833V383.25 h475.656c12.356-0.124,24.533,2.958,35.344,8.943C962.937,405.344,979.407,432.076,979.417,461.305z'
|
||||
/>
|
||||
<path
|
||||
opacity='0.2'
|
||||
enableBackground='new '
|
||||
d='M936.833,461.305v823.136c-0.046,43.067-34.861,78.015-77.927,78.225H425.833 V383.25h433.072c43.062,0.023,77.951,34.951,77.927,78.013C936.833,461.277,936.833,461.291,936.833,461.305z'
|
||||
/>
|
||||
<linearGradient
|
||||
id='SVGID_2_'
|
||||
gradientUnits='userSpaceOnUse'
|
||||
x1='162.7469'
|
||||
y1='1383.0741'
|
||||
x2='774.0864'
|
||||
y2='324.2592'
|
||||
gradientTransform='matrix(1 0 0 -1 0 1705.3334)'
|
||||
>
|
||||
<stop offset='0' style={{ stopColor: '#1784D9' }} />
|
||||
<stop offset='0.5' style={{ stopColor: '#107AD5' }} />
|
||||
<stop offset='1' style={{ stopColor: '#0A63C9' }} />
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_2_)" d="M78.055,383.25h780.723c43.109,0,78.055,34.947,78.055,78.055v780.723 c0,43.109-34.946,78.055-78.055,78.055H78.055c-43.109,0-78.055-34.947-78.055-78.055V461.305 C0,418.197,34.947,383.25,78.055,383.25z"/>
|
||||
<path fill="#FFFFFF" d="M243.96,710.631c19.238-40.988,50.29-75.289,89.17-98.495c43.057-24.651,92.081-36.94,141.675-35.515 c45.965-0.997,91.321,10.655,131.114,33.683c37.414,22.312,67.547,55.004,86.742,94.109c20.904,43.09,31.322,90.512,30.405,138.396 c1.013,50.043-9.706,99.628-31.299,144.783c-19.652,40.503-50.741,74.36-89.425,97.388c-41.327,23.734-88.367,35.692-136.011,34.578 c-46.947,1.133-93.303-10.651-134.01-34.067c-37.738-22.341-68.249-55.07-87.892-94.28c-21.028-42.467-31.57-89.355-30.745-136.735 C212.808,804.859,223.158,755.686,243.96,710.631z M339.006,941.858c10.257,25.912,27.651,48.385,50.163,64.812 c22.93,16.026,50.387,24.294,78.353,23.591c29.783,1.178,59.14-7.372,83.634-24.358c22.227-16.375,39.164-38.909,48.715-64.812 c10.677-28.928,15.946-59.572,15.543-90.404c0.33-31.127-4.623-62.084-14.649-91.554c-8.855-26.607-25.246-50.069-47.182-67.537 c-23.88-17.79-53.158-26.813-82.91-25.55c-28.572-0.74-56.644,7.593-80.184,23.804c-22.893,16.496-40.617,39.168-51.1,65.365 c-23.255,60.049-23.376,126.595-0.341,186.728L339.006,941.858z"/>
|
||||
<path fill="#50D9FF" d="M1362.667,255.5h383.25v383.25h-383.25V255.5z"/>
|
||||
<path
|
||||
fill='url(#SVGID_2_)'
|
||||
d='M78.055,383.25h780.723c43.109,0,78.055,34.947,78.055,78.055v780.723 c0,43.109-34.946,78.055-78.055,78.055H78.055c-43.109,0-78.055-34.947-78.055-78.055V461.305 C0,418.197,34.947,383.25,78.055,383.25z'
|
||||
/>
|
||||
<path
|
||||
fill='#FFFFFF'
|
||||
d='M243.96,710.631c19.238-40.988,50.29-75.289,89.17-98.495c43.057-24.651,92.081-36.94,141.675-35.515 c45.965-0.997,91.321,10.655,131.114,33.683c37.414,22.312,67.547,55.004,86.742,94.109c20.904,43.09,31.322,90.512,30.405,138.396 c1.013,50.043-9.706,99.628-31.299,144.783c-19.652,40.503-50.741,74.36-89.425,97.388c-41.327,23.734-88.367,35.692-136.011,34.578 c-46.947,1.133-93.303-10.651-134.01-34.067c-37.738-22.341-68.249-55.07-87.892-94.28c-21.028-42.467-31.57-89.355-30.745-136.735 C212.808,804.859,223.158,755.686,243.96,710.631z M339.006,941.858c10.257,25.912,27.651,48.385,50.163,64.812 c22.93,16.026,50.387,24.294,78.353,23.591c29.783,1.178,59.14-7.372,83.634-24.358c22.227-16.375,39.164-38.909,48.715-64.812 c10.677-28.928,15.946-59.572,15.543-90.404c0.33-31.127-4.623-62.084-14.649-91.554c-8.855-26.607-25.246-50.069-47.182-67.537 c-23.88-17.79-53.158-26.813-82.91-25.55c-28.572-0.74-56.644,7.593-80.184,23.804c-22.893,16.496-40.617,39.168-51.1,65.365 c-23.255,60.049-23.376,126.595-0.341,186.728L339.006,941.858z'
|
||||
/>
|
||||
<path fill='#50D9FF' d='M1362.667,255.5h383.25v383.25h-383.25V255.5z' />
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
@@ -67,9 +137,10 @@ With Microsoft Outlook, you can:
|
||||
In Sim Studio, the Microsoft Outlook integration enables your agents to interact directly with email and calendar data programmatically. This allows for powerful automation scenarios such as sending custom email updates, parsing incoming messages for workflow triggers, creating calendar events, and managing task reminders. By connecting Sim Studio with Microsoft Outlook, you enable intelligent agents to automate communications, streamline scheduling, and maintain visibility into organizational correspondence — all within your workflow ecosystem.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Integrate Outlook functionality to read, draft, and send email messages within your workflow. Automate email communications and process email content using OAuth authentication.
|
||||
Integrate Outlook functionality to read, draft, andsend email messages within your workflow. Automate email communications and process email content using OAuth authentication.
|
||||
|
||||
|
||||
|
||||
@@ -130,14 +201,13 @@ Read emails from Outlook
|
||||
| `accessToken` | string | Yes | OAuth access token for Outlook |
|
||||
| `folder` | string | No | Folder ID to read emails from \(default: Inbox\) |
|
||||
| `maxResults` | number | No | Maximum number of emails to retrieve \(default: 1, max: 10\) |
|
||||
| `messageId` | string | No | Message ID to read |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type |
|
||||
| --------- | ---- |
|
||||
| `message` | string |
|
||||
| `results` | json |
|
||||
| `results` | string |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
'use client'
|
||||
|
||||
import { useEffect, useRef, useState } from 'react'
|
||||
import { Check, ChevronDown, ExternalLink, RefreshCw } from 'lucide-react'
|
||||
import { Check, ChevronDown, ExternalLink, RefreshCw, Search } from 'lucide-react'
|
||||
import { useRouter, useSearchParams } from 'next/navigation'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Card } from '@/components/ui/card'
|
||||
import { Input } from '@/components/ui/input'
|
||||
import { Skeleton } from '@/components/ui/skeleton'
|
||||
import { client, useSession } from '@/lib/auth-client'
|
||||
import { createLogger } from '@/lib/logs/console-logger'
|
||||
@@ -32,6 +33,7 @@ export function Credentials({ onOpenChange }: CredentialsProps) {
|
||||
const pendingServiceRef = useRef<HTMLDivElement>(null)
|
||||
|
||||
const [services, setServices] = useState<ServiceInfo[]>([])
|
||||
const [searchTerm, setSearchTerm] = useState('')
|
||||
const [isLoading, setIsLoading] = useState(true)
|
||||
const [isConnecting, setIsConnecting] = useState<string | null>(null)
|
||||
const [pendingService, setPendingService] = useState<string | null>(null)
|
||||
@@ -292,6 +294,24 @@ export function Credentials({ onOpenChange }: CredentialsProps) {
|
||||
{} as Record<string, ServiceInfo[]>
|
||||
)
|
||||
|
||||
// Filter services based on search term
|
||||
const filteredGroupedServices = Object.entries(groupedServices).reduce(
|
||||
(acc, [providerKey, providerServices]) => {
|
||||
const filteredServices = providerServices.filter(
|
||||
(service) =>
|
||||
service.name.toLowerCase().includes(searchTerm.toLowerCase()) ||
|
||||
service.description.toLowerCase().includes(searchTerm.toLowerCase())
|
||||
)
|
||||
|
||||
if (filteredServices.length > 0) {
|
||||
acc[providerKey] = filteredServices
|
||||
}
|
||||
|
||||
return acc
|
||||
},
|
||||
{} as Record<string, ServiceInfo[]>
|
||||
)
|
||||
|
||||
const scrollToHighlightedService = () => {
|
||||
if (pendingServiceRef.current) {
|
||||
pendingServiceRef.current.scrollIntoView({
|
||||
@@ -304,7 +324,20 @@ export function Credentials({ onOpenChange }: CredentialsProps) {
|
||||
return (
|
||||
<div className='space-y-6 p-6'>
|
||||
<div>
|
||||
<h3 className='mb-1 font-medium text-lg'>Credentials</h3>
|
||||
<div className='mb-1 flex items-center justify-between'>
|
||||
<h3 className='font-medium text-lg'>Credentials</h3>
|
||||
|
||||
{/* Search Input */}
|
||||
<div className='relative w-48'>
|
||||
<Search className='-translate-y-1/2 absolute top-1/2 left-3 h-4 w-4 text-muted-foreground' />
|
||||
<Input
|
||||
placeholder='Search...'
|
||||
value={searchTerm}
|
||||
onChange={(e) => setSearchTerm(e.target.value)}
|
||||
className='h-9 pl-9 text-sm'
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<p className='mb-6 text-muted-foreground text-sm'>
|
||||
Connect your accounts to use tools that require authentication.
|
||||
</p>
|
||||
@@ -359,7 +392,7 @@ export function Credentials({ onOpenChange }: CredentialsProps) {
|
||||
) : (
|
||||
<div className='space-y-6'>
|
||||
{/* Group services by provider */}
|
||||
{Object.entries(groupedServices).map(([providerKey, providerServices]) => (
|
||||
{Object.entries(filteredGroupedServices).map(([providerKey, providerServices]) => (
|
||||
<div key={providerKey} className='space-y-4'>
|
||||
<h4 className='font-medium text-muted-foreground text-sm'>
|
||||
{OAUTH_PROVIDERS[providerKey]?.name || 'Other Services'}
|
||||
@@ -466,6 +499,13 @@ export function Credentials({ onOpenChange }: CredentialsProps) {
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
|
||||
{/* Show message when search has no results */}
|
||||
{searchTerm.trim() && Object.keys(filteredGroupedServices).length === 0 && (
|
||||
<div className='py-8 text-center text-muted-foreground text-sm'>
|
||||
No services found matching "{searchTerm}"
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
'use client'
|
||||
|
||||
import { useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { Search } from 'lucide-react'
|
||||
import {
|
||||
AlertDialog,
|
||||
AlertDialogAction,
|
||||
@@ -30,19 +31,28 @@ interface EnvironmentVariablesProps {
|
||||
}
|
||||
|
||||
export function EnvironmentVariables({ onOpenChange }: EnvironmentVariablesProps) {
|
||||
// Store access
|
||||
const { variables } = useEnvironmentStore()
|
||||
|
||||
// State
|
||||
const [envVars, setEnvVars] = useState<UIEnvironmentVariable[]>([])
|
||||
const [searchTerm, setSearchTerm] = useState('')
|
||||
const [focusedValueIndex, setFocusedValueIndex] = useState<number | null>(null)
|
||||
const [showUnsavedChanges, setShowUnsavedChanges] = useState(false)
|
||||
|
||||
// Refs
|
||||
const scrollContainerRef = useRef<HTMLDivElement>(null)
|
||||
const pendingClose = useRef(false)
|
||||
const initialVarsRef = useRef<UIEnvironmentVariable[]>([])
|
||||
|
||||
// Filter environment variables based on search term
|
||||
const filteredEnvVars = useMemo(() => {
|
||||
if (!searchTerm.trim()) {
|
||||
return envVars.map((envVar, index) => ({ envVar, originalIndex: index }))
|
||||
}
|
||||
|
||||
return envVars
|
||||
.map((envVar, index) => ({ envVar, originalIndex: index }))
|
||||
.filter(({ envVar }) => envVar.key.toLowerCase().includes(searchTerm.toLowerCase()))
|
||||
}, [envVars, searchTerm])
|
||||
|
||||
// Derived state
|
||||
const hasChanges = useMemo(() => {
|
||||
const initialVars = initialVarsRef.current.filter((v) => v.key || v.value)
|
||||
@@ -88,6 +98,8 @@ export function EnvironmentVariables({ onOpenChange }: EnvironmentVariablesProps
|
||||
const addEnvVar = () => {
|
||||
const newVar = { key: '', value: '', id: Date.now() }
|
||||
setEnvVars([...envVars, newVar])
|
||||
// Clear search to ensure the new variable is visible
|
||||
setSearchTerm('')
|
||||
}
|
||||
|
||||
const updateEnvVar = (index: number, field: 'key' | 'value', value: string) => {
|
||||
@@ -202,38 +214,43 @@ export function EnvironmentVariables({ onOpenChange }: EnvironmentVariablesProps
|
||||
}
|
||||
|
||||
// UI rendering
|
||||
const renderEnvVarRow = (envVar: UIEnvironmentVariable, index: number) => (
|
||||
<div key={envVar.id || index} className={`${GRID_COLS} items-center`}>
|
||||
const renderEnvVarRow = (envVar: UIEnvironmentVariable, originalIndex: number) => (
|
||||
<div key={envVar.id || originalIndex} className={`${GRID_COLS} items-center`}>
|
||||
<Input
|
||||
data-input-type='key'
|
||||
value={envVar.key}
|
||||
onChange={(e) => updateEnvVar(index, 'key', e.target.value)}
|
||||
onPaste={(e) => handlePaste(e, index)}
|
||||
onChange={(e) => updateEnvVar(originalIndex, 'key', e.target.value)}
|
||||
onPaste={(e) => handlePaste(e, originalIndex)}
|
||||
placeholder='API_KEY'
|
||||
autoComplete='off'
|
||||
autoCorrect='off'
|
||||
autoCapitalize='off'
|
||||
spellCheck='false'
|
||||
name={`env-var-key-${envVar.id || index}-${Math.random()}`}
|
||||
name={`env-var-key-${envVar.id || originalIndex}-${Math.random()}`}
|
||||
/>
|
||||
<Input
|
||||
data-input-type='value'
|
||||
value={envVar.value}
|
||||
onChange={(e) => updateEnvVar(index, 'value', e.target.value)}
|
||||
type={focusedValueIndex === index ? 'text' : 'password'}
|
||||
onFocus={(e) => handleValueFocus(index, e)}
|
||||
onChange={(e) => updateEnvVar(originalIndex, 'value', e.target.value)}
|
||||
type={focusedValueIndex === originalIndex ? 'text' : 'password'}
|
||||
onFocus={(e) => handleValueFocus(originalIndex, e)}
|
||||
onClick={handleValueClick}
|
||||
onBlur={() => setFocusedValueIndex(null)}
|
||||
onPaste={(e) => handlePaste(e, index)}
|
||||
onPaste={(e) => handlePaste(e, originalIndex)}
|
||||
placeholder='Enter value'
|
||||
className='allow-scroll'
|
||||
autoComplete='off'
|
||||
autoCorrect='off'
|
||||
autoCapitalize='off'
|
||||
spellCheck='false'
|
||||
name={`env-var-value-${envVar.id || index}-${Math.random()}`}
|
||||
name={`env-var-value-${envVar.id || originalIndex}-${Math.random()}`}
|
||||
/>
|
||||
<Button variant='ghost' size='icon' onClick={() => removeEnvVar(index)} className='h-10 w-10'>
|
||||
<Button
|
||||
variant='ghost'
|
||||
size='icon'
|
||||
onClick={() => removeEnvVar(originalIndex)}
|
||||
className='h-10 w-10'
|
||||
>
|
||||
×
|
||||
</Button>
|
||||
</div>
|
||||
@@ -243,7 +260,21 @@ export function EnvironmentVariables({ onOpenChange }: EnvironmentVariablesProps
|
||||
<div className='flex h-full flex-col'>
|
||||
{/* Fixed Header */}
|
||||
<div className='px-6 pt-6'>
|
||||
<h2 className='mb-6 font-medium text-lg'>Environment Variables</h2>
|
||||
<div className='mb-6 flex items-center justify-between'>
|
||||
<h2 className='font-medium text-lg'>Environment Variables</h2>
|
||||
|
||||
{/* Search Input */}
|
||||
<div className='relative w-48'>
|
||||
<Search className='-translate-y-1/2 absolute top-1/2 left-3 h-4 w-4 text-muted-foreground' />
|
||||
<Input
|
||||
placeholder='Search...'
|
||||
value={searchTerm}
|
||||
onChange={(e) => setSearchTerm(e.target.value)}
|
||||
className='h-9 pl-9 text-sm'
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className={`${GRID_COLS} mb-2 px-0.5`}>
|
||||
<Label>Key</Label>
|
||||
<Label>Value</Label>
|
||||
@@ -256,7 +287,17 @@ export function EnvironmentVariables({ onOpenChange }: EnvironmentVariablesProps
|
||||
ref={scrollContainerRef}
|
||||
className='scrollbar-thin scrollbar-thumb-muted-foreground/20 hover:scrollbar-thumb-muted-foreground/25 scrollbar-track-transparent min-h-0 flex-1 overflow-y-auto px-6'
|
||||
>
|
||||
<div className='space-y-2 py-2'>{envVars.map(renderEnvVarRow)}</div>
|
||||
<div className='space-y-2 py-2'>
|
||||
{filteredEnvVars.map(({ envVar, originalIndex }) =>
|
||||
renderEnvVarRow(envVar, originalIndex)
|
||||
)}
|
||||
{/* Show message when search has no results but there are variables */}
|
||||
{searchTerm.trim() && filteredEnvVars.length === 0 && envVars.length > 0 && (
|
||||
<div className='py-8 text-center text-muted-foreground text-sm'>
|
||||
No environment variables found matching "{searchTerm}"
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Fixed Footer */}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
CreditCard,
|
||||
Key,
|
||||
KeyRound,
|
||||
KeySquare,
|
||||
Lock,
|
||||
Settings,
|
||||
Shield,
|
||||
UserCircle,
|
||||
@@ -63,7 +63,7 @@ const allNavigationItems: NavigationItem[] = [
|
||||
{
|
||||
id: 'credentials',
|
||||
label: 'Credentials',
|
||||
icon: Key,
|
||||
icon: Lock,
|
||||
},
|
||||
{
|
||||
id: 'apikeys',
|
||||
|
||||
@@ -37,7 +37,7 @@ export const FileBlock: BlockConfig<FileParserOutput> = {
|
||||
? 'You can either provide a URL to a file or upload files directly. '
|
||||
: 'Upload files directly. '
|
||||
}Specialized parsers extract text and metadata from each format. You can upload multiple files at once and access them individually or as a combined document.`,
|
||||
docsLink: 'https://docs.simstudio.ai/tools/dropdown',
|
||||
docsLink: 'https://docs.simstudio.ai/tools/file',
|
||||
category: 'tools',
|
||||
bgColor: '#40916C',
|
||||
icon: DocumentIcon,
|
||||
|
||||
@@ -2541,9 +2541,9 @@ export function MicrosoftTeamsIcon(props: SVGProps<SVGSVGElement>) {
|
||||
y2='394.2607'
|
||||
gradientTransform='matrix(1 0 0 -1 0 2075.3333)'
|
||||
>
|
||||
<stop offset='0' stop-color='#5a62c3' />
|
||||
<stop offset='.5' stop-color='#4d55bd' />
|
||||
<stop offset='1' stop-color='#3940ab' />
|
||||
<stop offset='0' stopColor='#5a62c3' />
|
||||
<stop offset='.5' stopColor='#4d55bd' />
|
||||
<stop offset='1' stopColor='#3940ab' />
|
||||
</linearGradient>
|
||||
<path
|
||||
fill='url(#a)'
|
||||
@@ -2567,7 +2567,7 @@ export function OutlookIcon(props: SVGProps<SVGSVGElement>) {
|
||||
x='0px'
|
||||
y='0px'
|
||||
viewBox='0 0 1831.085 1703.335'
|
||||
enable-background='new 0 0 1831.085 1703.335'
|
||||
enableBackground='new 0 0 1831.085 1703.335'
|
||||
>
|
||||
<path
|
||||
fill='#0A2767'
|
||||
@@ -2605,7 +2605,7 @@ export function OutlookIcon(props: SVGProps<SVGSVGElement>) {
|
||||
<path
|
||||
opacity='0.5'
|
||||
fill='#0A2767'
|
||||
enable-background='new '
|
||||
enableBackground='new '
|
||||
d='M1797.017,891.397v44.287l-663.448,456.791L446.699,906.301 c0-0.235-0.191-0.426-0.426-0.426l0,0l-63.023-37.899v-31.938l25.976-0.426l54.932,31.512l1.277,0.426l4.684,2.981 c0,0,645.563,368.346,647.267,369.197l24.698,14.478c2.129-0.852,4.258-1.703,6.813-2.555 c1.278-0.852,640.879-360.681,640.879-360.681L1797.017,891.397z'
|
||||
/>
|
||||
<path
|
||||
@@ -2614,12 +2614,12 @@ export function OutlookIcon(props: SVGProps<SVGSVGElement>) {
|
||||
/>
|
||||
<path
|
||||
opacity='0.1'
|
||||
enable-background='new '
|
||||
enableBackground='new '
|
||||
d='M1185.52,1279.629l-9.496,5.323c-2.752,1.752-5.595,3.359-8.517,4.812 c-10.462,5.135-21.838,8.146-33.47,8.857l241.405,285.479l421.107,101.476c11.539-8.716,20.717-20.178,26.7-33.343L1185.52,1279.629 z'
|
||||
/>
|
||||
<path
|
||||
opacity='0.05'
|
||||
enable-background='new '
|
||||
enableBackground='new '
|
||||
d='M1228.529,1255.442l-52.505,29.51c-2.752,1.752-5.595,3.359-8.517,4.812 c-10.462,5.135-21.838,8.146-33.47,8.857l113.101,311.838l549.538,74.989c21.649-16.254,34.394-41.743,34.407-68.815v-9.326 L1228.529,1255.442z'
|
||||
/>
|
||||
<path
|
||||
@@ -2628,22 +2628,22 @@ export function OutlookIcon(props: SVGProps<SVGSVGElement>) {
|
||||
/>
|
||||
<path
|
||||
opacity='0.1'
|
||||
enable-background='new '
|
||||
enableBackground='new '
|
||||
d='M1022,418.722v908.303c-0.076,31.846-19.44,60.471-48.971,72.392 c-9.148,3.931-19,5.96-28.957,5.962H425.833V383.25H511v-42.583h433.073C987.092,340.83,1021.907,375.702,1022,418.722z'
|
||||
/>
|
||||
<path
|
||||
opacity='0.2'
|
||||
enable-background='new '
|
||||
enableBackground='new '
|
||||
d='M979.417,461.305v908.302c0.107,10.287-2.074,20.469-6.388,29.808 c-11.826,29.149-40.083,48.273-71.54,48.417H425.833V383.25h475.656c12.356-0.124,24.533,2.958,35.344,8.943 C962.937,405.344,979.407,432.076,979.417,461.305z'
|
||||
/>
|
||||
<path
|
||||
opacity='0.2'
|
||||
enable-background='new '
|
||||
enableBackground='new '
|
||||
d='M979.417,461.305v823.136c-0.208,43-34.928,77.853-77.927,78.225H425.833V383.25 h475.656c12.356-0.124,24.533,2.958,35.344,8.943C962.937,405.344,979.407,432.076,979.417,461.305z'
|
||||
/>
|
||||
<path
|
||||
opacity='0.2'
|
||||
enable-background='new '
|
||||
enableBackground='new '
|
||||
d='M936.833,461.305v823.136c-0.046,43.067-34.861,78.015-77.927,78.225H425.833 V383.25h433.072c43.062,0.023,77.951,34.951,77.927,78.013C936.833,461.277,936.833,461.291,936.833,461.305z'
|
||||
/>
|
||||
<linearGradient
|
||||
|
||||
@@ -170,9 +170,42 @@ function extractBlockConfig(fileContent: string): BlockConfig | null {
|
||||
|
||||
// Helper function to find the block type
|
||||
function findBlockType(content: string, blockName: string): string {
|
||||
// Try to find explicitly defined type
|
||||
const typeMatch = content.match(/type\s*:\s*['"]([^'"]+)['"]/)
|
||||
if (typeMatch) return typeMatch[1]
|
||||
// Try to find the type within the main block export
|
||||
// Look for the pattern: export const [BlockName]Block: BlockConfig = { ... type: 'value' ... }
|
||||
const blockExportRegex = new RegExp(
|
||||
`export\\s+const\\s+${blockName}Block\\s*:[^{]*{[\\s\\S]*?type\\s*:\\s*['"]([^'"]+)['"][\\s\\S]*?}`,
|
||||
'i'
|
||||
)
|
||||
const blockExportMatch = content.match(blockExportRegex)
|
||||
if (blockExportMatch) return blockExportMatch[1]
|
||||
|
||||
// Fallback: try to find type within a block config object that comes after the export
|
||||
const exportMatch = content.match(new RegExp(`export\\s+const\\s+${blockName}Block\\s*:`))
|
||||
if (exportMatch) {
|
||||
// Find the content after the export statement
|
||||
const afterExport = content.substring(exportMatch.index! + exportMatch[0].length)
|
||||
|
||||
// Look for the first opening brace and then find type within that block
|
||||
const blockStartMatch = afterExport.match(/{/)
|
||||
if (blockStartMatch) {
|
||||
const blockStart = blockStartMatch.index!
|
||||
|
||||
// Find the matching closing brace by counting braces
|
||||
let braceCount = 1
|
||||
let blockEnd = blockStart + 1
|
||||
|
||||
while (blockEnd < afterExport.length && braceCount > 0) {
|
||||
if (afterExport[blockEnd] === '{') braceCount++
|
||||
else if (afterExport[blockEnd] === '}') braceCount--
|
||||
blockEnd++
|
||||
}
|
||||
|
||||
// Extract the block content and look for type
|
||||
const blockContent = afterExport.substring(blockStart, blockEnd)
|
||||
const typeMatch = blockContent.match(/type\s*:\s*['"]([^'"]+)['"]/)
|
||||
if (typeMatch) return typeMatch[1]
|
||||
}
|
||||
}
|
||||
|
||||
// Convert CamelCase to snake_case as fallback
|
||||
return blockName
|
||||
|
||||
Reference in New Issue
Block a user