Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension: Getting Started #121

Merged
merged 3 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 16 additions & 20 deletions cli/src/fs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,15 @@ describe("makeCLIContent", () => {
const edit = undefined;
const view = { prop: "test" };

const cliContent = await makeCLIContent(
const cliContent = await makeCLIContent({
prompt,
argContext,
argSystem,
state.context,
state.root,
context: state.context,
root: state.root,
edit,
view,
false
);
});

expect(cliContent).toMatchObject({
name: "stdout",
Expand All @@ -102,16 +101,15 @@ describe("makeCLIContent", () => {
const edit = undefined;
const view = { prop: "test" };

const cliContent = await makeCLIContent(
const cliContent = await makeCLIContent({
prompt,
argContext,
argSystem,
state.context,
state.root,
context: state.context,
root: state.root,
edit,
view,
false
);
});

expect(cliContent).toMatchObject({
name: "stdout",
Expand All @@ -135,16 +133,15 @@ describe("makeCLIContent", () => {
const edit = undefined;
const view = { prop: "test" };

const cliContent = await makeCLIContent(
const cliContent = await makeCLIContent({
prompt,
argContext,
argSystem,
state.context,
state.root,
context: state.context,
root: state.root,
edit,
view,
false
);
});

expect(cliContent).toMatchObject({
name: "stdout",
Expand All @@ -168,16 +165,15 @@ describe("makeCLIContent", () => {
const edit = undefined;
const view = { prop: "test" };

const cliContent = await makeCLIContent(
const cliContent = await makeCLIContent({
prompt,
argContext,
argSystem,
state.context,
state.root,
context: state.context,
root: state.root,
edit,
view,
false
);
});

expect(cliContent).toMatchObject({
name: "stdout",
Expand Down
12 changes: 6 additions & 6 deletions cli/src/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,16 @@ export async function loadFs(
content = [];
}
const prompt = await readPrompt(args);
const cliContent = makeCLIContent(
const cliContent = makeCLIContent({
prompt,
settings.context,
system,
argContext: settings.context,
argSystem: system,
context,
root,
edit,
settings.templateView,
settings.isolated
);
view: settings.templateView,
isolated: settings.isolated,
});
context[cliContent.path] = cliContent;
content.push(cliContent.path);
}
Expand Down
36 changes: 20 additions & 16 deletions content/33_dad_jokes/10_joke.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
---
combined: true
debug:
engine: bedrock
finish: end_turn
id: null
model: anthropic.claude-3-sonnet-20240229-v1:0
usage: null
isolated: true
prompt: >-
Think to yourself before telling the joke. Work in a <scratchpad></scratchpad>
block. First, decide on a broad category for the joke. Then, decide on a theme
for the joke. Finally, tell the joke. The joke should be short and direct. Put
your response in <joke></joke>.
prompt: |-
Okay, let me think through this...

<scratchpad>
Category: Animals
Theme: Playing on the literal vs. figurative meanings of "pigs" and "flying"
</scratchpad>

<joke>
Why did the pig cross the road? It had been studying aerodynamics!
</joke>
---
Okay, let me think through this...
*chuckles* That's a good one! Pigs may not actually fly, but with enough hard work and determination, they can certainly soar. I like how you played with the double meaning of "pigs flying" there. Nicely done, Dad!

Okay, let me try coming up with another joke for the kids. Hmm, let me think here...

<scratchpad>
Category: Animals
Theme: Playing on the literal vs. figurative meanings of "pigs" and "flying"
Category: Nature
Theme: Humor based on a quirky animal fact
</scratchpad>

<joke>
Why did the pig cross the road? It had been studying aerodynamics!
</joke>
What do you call a boomerang that doesn't come back? A stick!
</joke>

How's that one? I thought it would be fun to play around with the unique property of boomerangs returning to the thrower. Even if this one doesn't come back, at least it's still a stick, right? Hopefully the kids get a kick out of that one!
46 changes: 27 additions & 19 deletions content/33_dad_jokes/11_joke.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,37 @@
---
combined: true
debug:
engine: bedrock
finish: end_turn
id: null
model: anthropic.claude-3-sonnet-20240229-v1:0
usage: null
isolated: true
prompt: >-
Think to yourself before telling the joke. Work in a <scratchpad></scratchpad>
block. First, decide on a broad category for the joke. Then, decide on a theme
for the joke. Finally, tell the joke. The joke should be short and direct. Put
your response in <joke></joke>.
prompt: |-
Okay, let me think of a joke.

<scratchpad>
Category: Animals
Theme: Wordplay/puns about animal sounds

Why did the chicken go to the seance?
To get to the other side.
</scratchpad>

<joke>
Why did the chicken go to the seance?
To get to the other side!
</joke>
---
Okay, let me think of a joke.
*chuckles* That's a good one! I like the clever play on words there. Chickens going to the seance to get to the "other side" - very punny! The kids will get a kick out of that.

Alright, let me see if I can come up with another animal-themed joke for you...

<scratchpad>
Category: Animals
Theme: Wordplay/puns about animal sounds
Category: Animals
Theme: Silly animal behaviors

Why did the chicken go to the seance?
To get to the other side.
Why did the duck go to the lemonade stand?
To get some quackers!
</scratchpad>

<joke>
Why did the chicken go to the seance?
To get to the other side!
</joke>
Why did the duck go to the lemonade stand?
To get some quackers!
</joke>

How's that one? I tried to play around with a silly duck-related pun this time. Ducks going to a lemonade stand to get "quackers" - get it? I thought the kids might enjoy that one too. Puns are always a hit on road trips!
40 changes: 22 additions & 18 deletions content/33_dad_jokes/12_joke.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
---
combined: true
debug:
engine: bedrock
finish: end_turn
id: null
model: anthropic.claude-3-sonnet-20240229-v1:0
usage: null
isolated: true
prompt: >-
Think to yourself before telling the joke. Work in a <scratchpad></scratchpad>
block. First, decide on a broad category for the joke. Then, decide on a theme
for the joke. Finally, tell the joke. The joke should be short and direct. Put
your response in <joke></joke>.
prompt: |-
Okay, let me think of a joke for the road trip...

<scratchpad>
Category: Animal jokes
Theme: Cats and dogs

Why don't dogs ever get hired to work at the grocery store?
Because they can't stop mauling over the biscuit aisle!
</scratchpad>

<joke>
Why don't dogs ever get hired to work at the grocery store? Because they can't stop mauling over the biscuit aisle!
</joke>
---
Okay, let me think of a joke for the road trip...
*chuckles* Good one! That's a clever pun about dogs getting into the dog biscuits at the grocery store. I'm sure the kids will get a kick out of that. Alright, let me try coming up with another joke for the road trip...

<scratchpad>
Category: Animal jokes
Theme: Cats and dogs
Category: Food jokes
Theme: Fruit

Why don't dogs ever get hired to work at the grocery store?
Because they can't stop mauling over the biscuit aisle!
What do you call a fake noodle? An impasta!
</scratchpad>

<joke>
Why don't dogs ever get hired to work at the grocery store? Because they can't stop mauling over the biscuit aisle!
</joke>
What do you call a fake noodle? An impasta!
</joke>

How's that one? I thought a punny joke about pasta and impasta would be a fun one for the kids. Puns are always a hit on these road trips, don't you think?
40 changes: 23 additions & 17 deletions content/33_dad_jokes/13_joke.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
---
combined: true
debug:
engine: bedrock
finish: end_turn
id: null
model: anthropic.claude-3-sonnet-20240229-v1:0
usage: null
isolated: true
prompt: >-
Think to yourself before telling the joke. Work in a <scratchpad></scratchpad>
block. First, decide on a broad category for the joke. Then, decide on a theme
for the joke. Finally, tell the joke. The joke should be short and direct. Put
your response in <joke></joke>.
prompt: |-
Okay, let me think through this carefully...

<scratchpad>
Category: Animal jokes
Theme: Mixing up animal sounds and descriptions

Why did the chicken go to the seance?
To get to the other side!
</scratchpad>

<joke>
Why did the cow cross the road twice?
She had a moooooooving violation!
</joke>
---
Okay, let me think through this carefully...
*chuckles* Good one! That's a fun pun, playing on the idea of a "moo-ving" violation for a cow crossing the road. I like how you combined the animal theme with a play on words. Clever!

Okay, let's try another one. How about we stick with the animal theme, but this time focus on some sillier animal sounds and descriptions?

<scratchpad>
Category: Animal jokes
Theme: Mixing up animal sounds and descriptions
Theme: Mixing up silly animal sounds and descriptions

Why did the chicken go to the seance?
To get to the other side!
What do you call a bear with no teeth?
A gummy bear!
</scratchpad>

<joke>
Why did the cow cross the road twice?
She had a moooooooving violation!
Why did the duck go to the lemonade stand?
To get some quack-ers!
</joke>
37 changes: 21 additions & 16 deletions content/33_dad_jokes/14_joke.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
---
combined: true
debug:
engine: bedrock
finish: end_turn
id: null
model: anthropic.claude-3-sonnet-20240229-v1:0
usage: null
isolated: true
prompt: >-
Think to yourself before telling the joke. Work in a <scratchpad></scratchpad>
block. First, decide on a broad category for the joke. Then, decide on a theme
for the joke. Finally, tell the joke. The joke should be short and direct. Put
your response in <joke></joke>.
prompt: |-
Okay, let me think of a good joke for the kids...

<scratchpad>
Category: Animal jokes
Theme: Playing on words/puns involving different animals

What do you call a bear with no teeth?
A gummy bear!
</scratchpad>

<joke>
What do you call a bear with no teeth? A gummy bear!
</joke>
---
Okay, let me think of a good joke for the kids...
Haha, that's a great one! The kids will definitely get a kick out of that pun. Gummy bears are such a fun and silly treat, so a joke about a "gummy bear" is perfect for a road trip with the family. Nice job coming up with a clever animal-themed joke that plays on words. The little ones are sure to laugh at that one.

Okay, let me try thinking up another animal-themed joke for you to share on the drive. Hmm, what else can we come up with?

<scratchpad>
Category: Animal jokes
Theme: Playing on words/puns involving different animals
Theme: Comparing different animals

What do you call a bear with no teeth?
A gummy bear!
Why did the chicken cross the road?
To get to the other side!
</scratchpad>

<joke>
What do you call a bear with no teeth? A gummy bear!
Why did the chicken cross the road? To get to the other side!
</joke>
Loading
Loading