fix: resolve type errors and lint issues for CI
- Fix SkeletonWithRelations type mapping in batch-processor.ts by explicitly mapping only the required fields - Escape unescaped entities in tutorial pages (apostrophes and quotes)
This commit is contained in:
parent
152a076580
commit
287d84163f
3 changed files with 25 additions and 17 deletions
|
|
@ -25,7 +25,7 @@ const slides: Slide[] = [
|
|||
<div className="text-center space-y-6">
|
||||
<p className="text-xl text-foreground-secondary max-w-2xl mx-auto">
|
||||
AI Agents are custom assistants that can use tools from TPMJS to accomplish tasks. In just
|
||||
5 steps, you'll have your own agent up and running.
|
||||
5 steps, you'll have your own agent up and running.
|
||||
</p>
|
||||
<div className="flex flex-wrap justify-center gap-4 mt-8">
|
||||
<div className="flex items-center gap-2 px-4 py-2 bg-surface-secondary rounded-full">
|
||||
|
|
@ -123,9 +123,11 @@ const slides: Slide[] = [
|
|||
2
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-foreground font-medium">Click "Add Key" for your provider</p>
|
||||
<p className="text-foreground font-medium">
|
||||
Click "Add Key" for your provider
|
||||
</p>
|
||||
<p className="text-foreground-secondary text-sm">
|
||||
Each provider card has an "Add Key" button
|
||||
Each provider card has an "Add Key" button
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -163,7 +165,7 @@ const slides: Slide[] = [
|
|||
<div className="p-3 bg-surface-secondary rounded-lg">
|
||||
<p className="text-sm font-medium text-foreground">Name</p>
|
||||
<p className="text-sm text-foreground-tertiary">
|
||||
e.g., "Code Helper", "Data Analyst"
|
||||
e.g., "Code Helper", "Data Analyst"
|
||||
</p>
|
||||
</div>
|
||||
<div className="p-3 bg-surface-secondary rounded-lg">
|
||||
|
|
@ -184,7 +186,7 @@ const slides: Slide[] = [
|
|||
<div className="p-3 bg-surface-secondary rounded-lg">
|
||||
<p className="text-sm font-medium text-foreground">System Prompt</p>
|
||||
<p className="text-sm text-foreground-tertiary">
|
||||
Define your agent's personality & capabilities
|
||||
Define your agent's personality & capabilities
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -272,8 +274,8 @@ const slides: Slide[] = [
|
|||
content: (
|
||||
<div className="space-y-8">
|
||||
<p className="text-lg text-foreground-secondary text-center max-w-2xl mx-auto">
|
||||
Click the "Chat" button on your agent to start a conversation. Your agent will use its
|
||||
tools to help you.
|
||||
Click the "Chat" button on your agent to start a conversation. Your agent will
|
||||
use its tools to help you.
|
||||
</p>
|
||||
<div className="max-w-2xl mx-auto bg-surface-secondary rounded-lg border border-border overflow-hidden">
|
||||
<div className="p-4 bg-background border-b border-border">
|
||||
|
|
@ -336,7 +338,7 @@ const slides: Slide[] = [
|
|||
</Link>
|
||||
</div>
|
||||
<div className="max-w-2xl mx-auto pt-8 border-t border-border mt-8">
|
||||
<h4 className="text-lg font-semibold text-foreground mb-4">What's Next?</h4>
|
||||
<h4 className="text-lg font-semibold text-foreground mb-4">What's Next?</h4>
|
||||
<div className="grid md:grid-cols-3 gap-4 text-left">
|
||||
<div className="p-4 bg-surface-secondary rounded-lg">
|
||||
<p className="font-medium text-foreground">Use the API</p>
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ const slides: Slide[] = [
|
|||
</li>
|
||||
<li className="flex items-start gap-2">
|
||||
<span className="text-red-500 mt-0.5">✗</span>
|
||||
<span>Can't take real actions</span>
|
||||
<span>Can't take real actions</span>
|
||||
</li>
|
||||
<li className="flex items-start gap-2">
|
||||
<span className="text-red-500 mt-0.5">✗</span>
|
||||
|
|
@ -145,7 +145,8 @@ const slides: Slide[] = [
|
|||
<div>
|
||||
<p className="text-foreground font-medium">Create New Collection</p>
|
||||
<p className="text-foreground-secondary text-sm">
|
||||
Give it a name like "My Development Tools" or "Research Assistant"
|
||||
Give it a name like "My Development Tools" or "Research
|
||||
Assistant"
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -205,7 +206,7 @@ const slides: Slide[] = [
|
|||
<code className="bg-background px-1.5 py-0.5 rounded text-xs">
|
||||
tpmjs.com/mcp/c/{'{collection-uid}'}
|
||||
</code>
|
||||
— you can also find it on your collection's detail page.
|
||||
— you can also find it on your collection's detail page.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -309,7 +310,8 @@ const slides: Slide[] = [
|
|||
<div className="max-w-2xl mx-auto p-4 bg-primary/5 border border-primary/20 rounded-lg">
|
||||
<p className="text-sm text-foreground">
|
||||
<strong>Any MCP client works!</strong> The URL format is the same regardless of which
|
||||
client you're using. Check your client's documentation for config file location.
|
||||
client you're using. Check your client's documentation for config file
|
||||
location.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -339,7 +341,8 @@ const slides: Slide[] = [
|
|||
<div className="flex justify-end">
|
||||
<div className="bg-primary text-primary-foreground rounded-lg px-4 py-2 max-w-[80%]">
|
||||
<p className="text-sm">
|
||||
Run this Python code and show me the output: print("Hello from TPMJS!")
|
||||
Run this Python code and show me the output: print("Hello from
|
||||
TPMJS!")
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -348,7 +351,7 @@ const slides: Slide[] = [
|
|||
<p className="text-xs text-primary mb-2">
|
||||
Using tool: unsandbox-executeCodeAsync
|
||||
</p>
|
||||
<p className="text-sm text-foreground">Here's the result:</p>
|
||||
<p className="text-sm text-foreground">Here's the result:</p>
|
||||
<pre className="mt-2 p-2 bg-surface-secondary rounded text-xs font-mono">
|
||||
Hello from TPMJS!
|
||||
</pre>
|
||||
|
|
@ -382,7 +385,7 @@ const slides: Slide[] = [
|
|||
content: (
|
||||
<div className="space-y-8 text-center">
|
||||
<p className="text-xl text-foreground-secondary max-w-2xl mx-auto">
|
||||
That's it! Your AI assistant can now use any tool in your TPMJS collection.
|
||||
That's it! Your AI assistant can now use any tool in your TPMJS collection.
|
||||
</p>
|
||||
<div className="flex flex-wrap justify-center gap-4">
|
||||
<Link href="/dashboard/collections">
|
||||
|
|
|
|||
|
|
@ -259,13 +259,16 @@ export class BatchProcessor {
|
|||
: new Map();
|
||||
|
||||
return skeletons
|
||||
.map((s) => {
|
||||
.map((s): SkeletonWithRelations | null => {
|
||||
const category = categoryMap.get(s.categoryId);
|
||||
const verb = verbMap.get(s.verbId);
|
||||
const object = objectMap.get(s.objectId);
|
||||
if (!category || !verb || !object) return null;
|
||||
return {
|
||||
...s,
|
||||
id: s.id,
|
||||
hash: s.hash,
|
||||
rawName: s.rawName,
|
||||
compatibilityScore: s.compatibilityScore,
|
||||
category,
|
||||
verb,
|
||||
object,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue