feat: Introduce a comprehensive set of AI agent skills, agents, and workflows, along with new UI components and application structure.
This commit is contained in:
1 parent
a2a512d41d
commit
93df87d7e9
317 files changed
+63716
-8727
No files matched your search
@@ -1,37 +0,0 @@
|
||||
// Script cross-platform Node.js para instalar dependências Python
|
||||
import { execSync } from 'child_process';
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
const isWindows = process.platform === 'win32';
|
||||
const pythonCmd = isWindows ? 'python' : 'python3';
|
||||
const requirementsPath = path.join(__dirname, '..', 'src-python', 'requirements.txt');
|
||||
|
||||
if (!fs.existsSync(requirementsPath)) {
|
||||
console.error(`[Python Deps] ERRO: Arquivo não encontrado: ${requirementsPath}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log(`[Python Deps] Verificando dependências em: ${requirementsPath}`);
|
||||
|
||||
try {
|
||||
// Verifica pip
|
||||
execSync(`${pythonCmd} -m pip --version`, { stdio: 'ignore' });
|
||||
|
||||
// Atualiza pip
|
||||
console.log('[Python Deps] Atualizando pip...');
|
||||
execSync(`${pythonCmd} -m pip install --quiet --upgrade pip`, { stdio: 'inherit' });
|
||||
|
||||
// Instala dependências
|
||||
console.log('[Python Deps] Instalando dependências...');
|
||||
execSync(`${pythonCmd} -m pip install --quiet -r "${requirementsPath}"`, { stdio: 'inherit' });
|
||||
|
||||
console.log('[Python Deps] Dependências instaladas com sucesso.');
|
||||
} catch (error) {
|
||||
console.error('[Python Deps] ERRO: Falha ao instalar dependências.');
|
||||
process.exit(1);
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
# Script PowerShell para instalar dependências Python antes de executar
|
||||
param(
|
||||
[string]$RequirementsPath = "src-python\requirements.txt",
|
||||
[string]$PythonCmd = "python"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
# Resolve caminho absoluto
|
||||
$RequirementsFile = Join-Path $PSScriptRoot "..\$RequirementsPath" | Resolve-Path -ErrorAction Stop
|
||||
|
||||
Write-Host "[Python Deps] Verificando dependências em: $RequirementsFile" -ForegroundColor Cyan
|
||||
|
||||
# Verifica se pip está disponível
|
||||
try {
|
||||
$pipVersion = & $PythonCmd -m pip --version 2>&1
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "[Python Deps] ERRO: pip não encontrado. Instale Python com pip." -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
} catch {
|
||||
Write-Host "[Python Deps] ERRO: Python não encontrado. Verifique se está no PATH." -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Instala dependências
|
||||
Write-Host "[Python Deps] Instalando dependências..." -ForegroundColor Yellow
|
||||
& $PythonCmd -m pip install --quiet --upgrade pip
|
||||
& $PythonCmd -m pip install --quiet -r $RequirementsFile
|
||||
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
Write-Host "[Python Deps] Dependências instaladas com sucesso." -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "[Python Deps] ERRO: Falha ao instalar dependências." -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Script Bash para instalar dependências Python antes de executar
|
||||
|
||||
set -e
|
||||
|
||||
REQUIREMENTS_PATH="${1:-src-python/requirements.txt}"
|
||||
PYTHON_CMD="${2:-python3}"
|
||||
|
||||
# Resolve caminho absoluto
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
REQUIREMENTS_FILE="$SCRIPT_DIR/../$REQUIREMENTS_PATH"
|
||||
|
||||
if [ ! -f "$REQUIREMENTS_FILE" ]; then
|
||||
echo "[Python Deps] ERRO: Arquivo não encontrado: $REQUIREMENTS_FILE" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "[Python Deps] Verificando dependências em: $REQUIREMENTS_FILE"
|
||||
|
||||
# Verifica se pip está disponível
|
||||
if ! $PYTHON_CMD -m pip --version >/dev/null 2>&1; then
|
||||
echo "[Python Deps] ERRO: pip não encontrado. Instale Python com pip." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Instala dependências
|
||||
echo "[Python Deps] Instalando dependências..."
|
||||
$PYTHON_CMD -m pip install --quiet --upgrade pip
|
||||
$PYTHON_CMD -m pip install --quiet -r "$REQUIREMENTS_FILE"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "[Python Deps] Dependências instaladas com sucesso."
|
||||
else
|
||||
echo "[Python Deps] ERRO: Falha ao instalar dependências." >&2
|
||||
exit 1
|
||||
fi
|
||||
@@ -0,0 +1,112 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* This script is used to reset the project to a blank state.
|
||||
* It deletes or moves the /app, /components, /hooks, /scripts, and /constants directories to /app-example based on user input and creates a new /app directory with an index.tsx and _layout.tsx file.
|
||||
* You can remove the `reset-project` script from package.json and safely delete this file after running it.
|
||||
*/
|
||||
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const readline = require("readline");
|
||||
|
||||
const root = process.cwd();
|
||||
const oldDirs = ["app", "components", "hooks", "constants", "scripts"];
|
||||
const exampleDir = "app-example";
|
||||
const newAppDir = "app";
|
||||
const exampleDirPath = path.join(root, exampleDir);
|
||||
|
||||
const indexContent = `import { Text, View } from "react-native";
|
||||
|
||||
export default function Index() {
|
||||
return (
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
<Text>Edit app/index.tsx to edit this screen.</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
`;
|
||||
|
||||
const layoutContent = `import { Stack } from "expo-router";
|
||||
|
||||
export default function RootLayout() {
|
||||
return <Stack />;
|
||||
}
|
||||
`;
|
||||
|
||||
const rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout,
|
||||
});
|
||||
|
||||
const moveDirectories = async (userInput) => {
|
||||
try {
|
||||
if (userInput === "y") {
|
||||
// Create the app-example directory
|
||||
await fs.promises.mkdir(exampleDirPath, { recursive: true });
|
||||
console.log(`📁 /${exampleDir} directory created.`);
|
||||
}
|
||||
|
||||
// Move old directories to new app-example directory or delete them
|
||||
for (const dir of oldDirs) {
|
||||
const oldDirPath = path.join(root, dir);
|
||||
if (fs.existsSync(oldDirPath)) {
|
||||
if (userInput === "y") {
|
||||
const newDirPath = path.join(root, exampleDir, dir);
|
||||
await fs.promises.rename(oldDirPath, newDirPath);
|
||||
console.log(`➡️ /${dir} moved to /${exampleDir}/${dir}.`);
|
||||
} else {
|
||||
await fs.promises.rm(oldDirPath, { recursive: true, force: true });
|
||||
console.log(`❌ /${dir} deleted.`);
|
||||
}
|
||||
} else {
|
||||
console.log(`➡️ /${dir} does not exist, skipping.`);
|
||||
}
|
||||
}
|
||||
|
||||
// Create new /app directory
|
||||
const newAppDirPath = path.join(root, newAppDir);
|
||||
await fs.promises.mkdir(newAppDirPath, { recursive: true });
|
||||
console.log("\n📁 New /app directory created.");
|
||||
|
||||
// Create index.tsx
|
||||
const indexPath = path.join(newAppDirPath, "index.tsx");
|
||||
await fs.promises.writeFile(indexPath, indexContent);
|
||||
console.log("📄 app/index.tsx created.");
|
||||
|
||||
// Create _layout.tsx
|
||||
const layoutPath = path.join(newAppDirPath, "_layout.tsx");
|
||||
await fs.promises.writeFile(layoutPath, layoutContent);
|
||||
console.log("📄 app/_layout.tsx created.");
|
||||
|
||||
console.log("\n✅ Project reset complete. Next steps:");
|
||||
console.log(
|
||||
`1. Run \`npx expo start\` to start a development server.\n2. Edit app/index.tsx to edit the main screen.${
|
||||
userInput === "y"
|
||||
? `\n3. Delete the /${exampleDir} directory when you're done referencing it.`
|
||||
: ""
|
||||
}`
|
||||
);
|
||||
} catch (error) {
|
||||
console.error(`❌ Error during script execution: ${error.message}`);
|
||||
}
|
||||
};
|
||||
|
||||
rl.question(
|
||||
"Do you want to move existing files to /app-example instead of deleting them? (Y/n): ",
|
||||
(answer) => {
|
||||
const userInput = answer.trim().toLowerCase() || "y";
|
||||
if (userInput === "y" || userInput === "n") {
|
||||
moveDirectories(userInput).finally(() => rl.close());
|
||||
} else {
|
||||
console.log("❌ Invalid input. Please enter 'Y' or 'N'.");
|
||||
rl.close();
|
||||
}
|
||||
}
|
||||
);
|
||||
Reference in new issue
Block a user