Spaces:
Build error
Build error
Mehdi commited on
Upload components/Documentation.jsx with huggingface_hub
Browse files- components/Documentation.jsx +33 -105
components/Documentation.jsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import Link from 'next/link'
|
| 2 |
-
import { FiBook, FiCode, FiCpu, FiServer, FiDatabase, FiCloud } from 'react-icons/fi'
|
| 3 |
import { useState } from 'react'
|
| 4 |
import ReactMarkdown from 'react-markdown'
|
| 5 |
import remarkGfm from 'remark-gfm'
|
|
@@ -14,16 +14,16 @@ export default function Documentation() {
|
|
| 14 |
title: 'Getting Started',
|
| 15 |
icon: <FiBook />,
|
| 16 |
content: `
|
| 17 |
-
# Getting Started with
|
| 18 |
|
| 19 |
## Installation
|
| 20 |
|
| 21 |
-
To get started with our
|
| 22 |
|
| 23 |
1. **Clone the repository**:
|
| 24 |
\`\`\`bash
|
| 25 |
-
git clone https://github.com/your-repo/
|
| 26 |
-
cd
|
| 27 |
\`\`\`
|
| 28 |
|
| 29 |
2. **Install dependencies**:
|
|
@@ -45,21 +45,37 @@ To get started with our platform, follow these simple steps:
|
|
| 45 |
|
| 46 |
## First Steps
|
| 47 |
|
| 48 |
-
1. Launch the
|
| 49 |
2. Select your preferred programming language
|
| 50 |
3. Start coding with AI assistance
|
| 51 |
4. Run and test your code
|
|
|
|
| 52 |
`,
|
| 53 |
link: '/docs/getting-started'
|
| 54 |
},
|
| 55 |
{
|
| 56 |
-
id: '
|
| 57 |
-
title: '
|
| 58 |
icon: <FiCode />,
|
| 59 |
content: `
|
| 60 |
-
#
|
| 61 |
|
| 62 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
- JavaScript/TypeScript
|
| 65 |
- Python
|
|
@@ -67,25 +83,10 @@ To get started with our platform, follow these simple steps:
|
|
| 67 |
- C#
|
| 68 |
- Go
|
| 69 |
- Rust
|
|
|
|
| 70 |
- And more...
|
| 71 |
-
|
| 72 |
-
## Keyboard Shortcuts
|
| 73 |
-
|
| 74 |
-
| Shortcut | Action |
|
| 75 |
-
|----------|--------|
|
| 76 |
-
| Ctrl+S | Save snippet |
|
| 77 |
-
| Ctrl+Enter | Run code |
|
| 78 |
-
| Ctrl+Space | Trigger completion |
|
| 79 |
-
| Ctrl+/ | Toggle comment |
|
| 80 |
-
|
| 81 |
-
## Advanced Features
|
| 82 |
-
|
| 83 |
-
- **Monaco Editor Integration**: Full-featured code editor with syntax highlighting
|
| 84 |
-
- **Snippet Management**: Save and load code snippets
|
| 85 |
-
- **Themes**: Multiple color themes available
|
| 86 |
-
- **Font Customization**: Adjust font size and family
|
| 87 |
`,
|
| 88 |
-
link: '/docs/
|
| 89 |
},
|
| 90 |
{
|
| 91 |
id: 'model-integration',
|
|
@@ -99,13 +100,14 @@ To get started with our platform, follow these simple steps:
|
|
| 99 |
1. **CodeGen 2B**: Python/JavaScript code generation
|
| 100 |
2. **StableCode**: Multi-language code completion
|
| 101 |
3. **DeepSeek Coder**: Advanced code understanding
|
|
|
|
| 102 |
|
| 103 |
## Integration Steps
|
| 104 |
|
| 105 |
1. **Download the model** from the Models page
|
| 106 |
2. **Initialize in your code**:
|
| 107 |
\`\`\`javascript
|
| 108 |
-
const model = require('@
|
| 109 |
const instance = new model({ temperature: 0.7 })
|
| 110 |
\`\`\`
|
| 111 |
|
|
@@ -199,12 +201,12 @@ API keys are required for production use. Get your key from the account settings
|
|
| 199 |
|
| 200 |
1. Build the image:
|
| 201 |
\`\`\`bash
|
| 202 |
-
docker build -t
|
| 203 |
\`\`\`
|
| 204 |
|
| 205 |
2. Run the container:
|
| 206 |
\`\`\`bash
|
| 207 |
-
docker run -p 3000:3000
|
| 208 |
\`\`\`
|
| 209 |
|
| 210 |
## Cloud Platforms
|
|
@@ -245,78 +247,4 @@ API keys are required for production use. Get your key from the account settings
|
|
| 245 |
<input
|
| 246 |
type="text"
|
| 247 |
placeholder="Search docs..."
|
| 248 |
-
value={searchTerm
|
| 249 |
-
onChange={(e) => setSearchTerm(e.target.value)}
|
| 250 |
-
className="w-full pl-10 pr-4 py-2 border border-gray-200 rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent"
|
| 251 |
-
/>
|
| 252 |
-
</div>
|
| 253 |
-
|
| 254 |
-
<h3 className="font-bold text-gray-800 mb-3">Documentation</h3>
|
| 255 |
-
<ul className="space-y-2">
|
| 256 |
-
{filteredDocs.map((doc) => (
|
| 257 |
-
<li key={doc.id}>
|
| 258 |
-
<button
|
| 259 |
-
onClick={() => setActiveSection(doc.id)}
|
| 260 |
-
className={`w-full text-left p-2 rounded-lg flex items-center space-x-2 transition-colors ${activeSection === doc.id ? 'bg-primary text-white' : 'text-gray-600 hover:bg-gray-100'}`}
|
| 261 |
-
>
|
| 262 |
-
<span>{doc.icon}</span>
|
| 263 |
-
<span>{doc.title}</span>
|
| 264 |
-
</button>
|
| 265 |
-
</li>
|
| 266 |
-
))}
|
| 267 |
-
</ul>
|
| 268 |
-
|
| 269 |
-
<div className="mt-6 pt-4 border-t border-gray-200">
|
| 270 |
-
<h4 className="font-medium text-gray-800 mb-2">Additional Resources</h4>
|
| 271 |
-
<ul className="space-y-2">
|
| 272 |
-
<li>
|
| 273 |
-
<Link href="/api-docs" className="text-primary hover:text-blue-600 flex items-center space-x-2">
|
| 274 |
-
<FiCode />
|
| 275 |
-
<span>API Documentation</span>
|
| 276 |
-
</Link>
|
| 277 |
-
</li>
|
| 278 |
-
<li>
|
| 279 |
-
<Link href="/examples" className="text-primary hover:text-blue-600 flex items-center space-x-2">
|
| 280 |
-
<FiBook />
|
| 281 |
-
<span>Code Examples</span>
|
| 282 |
-
</Link>
|
| 283 |
-
</li>
|
| 284 |
-
<li>
|
| 285 |
-
<Link href="/community" className="text-primary hover:text-blue-600 flex items-center space-x-2">
|
| 286 |
-
<FiCpu />
|
| 287 |
-
<span>Community Forum</span>
|
| 288 |
-
</Link>
|
| 289 |
-
</li>
|
| 290 |
-
</ul>
|
| 291 |
-
</div>
|
| 292 |
-
</div>
|
| 293 |
-
</div>
|
| 294 |
-
|
| 295 |
-
<div className="lg:col-span-3">
|
| 296 |
-
{filteredDocs.map((doc) => (
|
| 297 |
-
<div key={doc.id} className={`bg-white rounded-lg shadow-md p-6 mb-6 ${activeSection === doc.id ? 'block' : 'hidden'}`}>
|
| 298 |
-
<div className="flex justify-between items-center mb-4">
|
| 299 |
-
<h2 className="text-2xl font-bold text-gray-800 flex items-center space-x-2">
|
| 300 |
-
<span>{doc.icon}</span>
|
| 301 |
-
<span>{doc.title}</span>
|
| 302 |
-
</h2>
|
| 303 |
-
<Link
|
| 304 |
-
href={doc.link}
|
| 305 |
-
className="text-primary hover:text-blue-600 flex items-center space-x-1"
|
| 306 |
-
>
|
| 307 |
-
<span>View Full Guide</span>
|
| 308 |
-
<span>→</span>
|
| 309 |
-
</Link>
|
| 310 |
-
</div>
|
| 311 |
-
|
| 312 |
-
<div className="prose max-w-none">
|
| 313 |
-
<ReactMarkdown remarkPlugins={[remarkGfm]}>
|
| 314 |
-
{doc.content}
|
| 315 |
-
</ReactMarkdown>
|
| 316 |
-
</div>
|
| 317 |
-
</div>
|
| 318 |
-
))}
|
| 319 |
-
</div>
|
| 320 |
-
</div>
|
| 321 |
-
)
|
| 322 |
-
}
|
|
|
|
| 1 |
import Link from 'next/link'
|
| 2 |
+
import { FiBook, FiCode, FiCpu, FiServer, FiDatabase, FiCloud, FiTerminal, FiGitBranch, FiZap } from 'react-icons/fi'
|
| 3 |
import { useState } from 'react'
|
| 4 |
import ReactMarkdown from 'react-markdown'
|
| 5 |
import remarkGfm from 'remark-gfm'
|
|
|
|
| 14 |
title: 'Getting Started',
|
| 15 |
icon: <FiBook />,
|
| 16 |
content: `
|
| 17 |
+
# Getting Started with SMH-FULL-CODE
|
| 18 |
|
| 19 |
## Installation
|
| 20 |
|
| 21 |
+
To get started with our VSCode-like IDE, follow these simple steps:
|
| 22 |
|
| 23 |
1. **Clone the repository**:
|
| 24 |
\`\`\`bash
|
| 25 |
+
git clone https://github.com/your-repo/smh-full-code.git
|
| 26 |
+
cd smh-full-code
|
| 27 |
\`\`\`
|
| 28 |
|
| 29 |
2. **Install dependencies**:
|
|
|
|
| 45 |
|
| 46 |
## First Steps
|
| 47 |
|
| 48 |
+
1. Launch the IDE
|
| 49 |
2. Select your preferred programming language
|
| 50 |
3. Start coding with AI assistance
|
| 51 |
4. Run and test your code
|
| 52 |
+
5. Use the integrated terminal and debug tools
|
| 53 |
`,
|
| 54 |
link: '/docs/getting-started'
|
| 55 |
},
|
| 56 |
{
|
| 57 |
+
id: 'ide-features',
|
| 58 |
+
title: 'IDE Features',
|
| 59 |
icon: <FiCode />,
|
| 60 |
content: `
|
| 61 |
+
# SMH-FULL-CODE Features
|
| 62 |
|
| 63 |
+
## VSCode-like Interface
|
| 64 |
+
|
| 65 |
+
- **Monaco Editor Integration**: Full-featured code editor with syntax highlighting
|
| 66 |
+
- **Multiple Panels**: Editor, Terminal, Debug Console
|
| 67 |
+
- **Keyboard Shortcuts**: Familiar VSCode shortcuts (Ctrl+S, F5, etc.)
|
| 68 |
+
- **Theme Support**: Multiple color themes including VSCode Dark/Light
|
| 69 |
+
|
| 70 |
+
## Advanced Features
|
| 71 |
+
|
| 72 |
+
- **Integrated Terminal**: Run commands without leaving the IDE
|
| 73 |
+
- **Debug Console**: Set breakpoints and inspect variables
|
| 74 |
+
- **Snippet Management**: Save and load code snippets
|
| 75 |
+
- **Project Explorer**: File and folder management
|
| 76 |
+
- **AI Integration**: Code completion and suggestions
|
| 77 |
+
|
| 78 |
+
## Language Support
|
| 79 |
|
| 80 |
- JavaScript/TypeScript
|
| 81 |
- Python
|
|
|
|
| 83 |
- C#
|
| 84 |
- Go
|
| 85 |
- Rust
|
| 86 |
+
- HTML/CSS
|
| 87 |
- And more...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
`,
|
| 89 |
+
link: '/docs/ide-features'
|
| 90 |
},
|
| 91 |
{
|
| 92 |
id: 'model-integration',
|
|
|
|
| 100 |
1. **CodeGen 2B**: Python/JavaScript code generation
|
| 101 |
2. **StableCode**: Multi-language code completion
|
| 102 |
3. **DeepSeek Coder**: Advanced code understanding
|
| 103 |
+
4. **Offline Models**: For local development without internet
|
| 104 |
|
| 105 |
## Integration Steps
|
| 106 |
|
| 107 |
1. **Download the model** from the Models page
|
| 108 |
2. **Initialize in your code**:
|
| 109 |
\`\`\`javascript
|
| 110 |
+
const model = require('@smh-full-code/codegen')
|
| 111 |
const instance = new model({ temperature: 0.7 })
|
| 112 |
\`\`\`
|
| 113 |
|
|
|
|
| 201 |
|
| 202 |
1. Build the image:
|
| 203 |
\`\`\`bash
|
| 204 |
+
docker build -t smh-full-code .
|
| 205 |
\`\`\`
|
| 206 |
|
| 207 |
2. Run the container:
|
| 208 |
\`\`\`bash
|
| 209 |
+
docker run -p 3000:3000 smh-full-code
|
| 210 |
\`\`\`
|
| 211 |
|
| 212 |
## Cloud Platforms
|
|
|
|
| 247 |
<input
|
| 248 |
type="text"
|
| 249 |
placeholder="Search docs..."
|
| 250 |
+
value={searchTerm
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|