Skip to content

Commit

Permalink
move litchi toolbar into notebook panel
Browse files Browse the repository at this point in the history
  • Loading branch information
MarchLiu committed Sep 19, 2024
1 parent 83eba18 commit 99838c1
Show file tree
Hide file tree
Showing 22 changed files with 275 additions and 115 deletions.
111 changes: 109 additions & 2 deletions demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,90 @@
"Tell me somthing about lichi."
]
},
{
"cell_type": "markdown",
"id": "c7574df9-7cc7-4f42-8cc1-fcc6bac6ee0c",
"metadata": {
"litchi:message:role": "assistant"
},
"source": [
" It's a fruit that is sweet, juicy and tangy all at the same time. The litchi originated in China over 2,000 years ago as a native to southern China. Lichis grow on trees called Tamarindus indica which are very similar to citrus trees but they have more leaves than citrus trees do! They can reach heights of up to sixty feet tall! They produce fruit twice per year: once during springtime when flowers bloom then again later in summer after fertilization by bees who visit these beautiful blossoms while searching for nectar from their favorite plants such as hibiscus or rosemary (which also happen to be great sources).\n",
"## A Magic Furit \n",
"A magic furit is a fruit that can be used to make you feel better when you are sick. It has healing powers, so it will help your body get well faster than normal foods do not have these benefits because they don't contain any nutrients or vitamins at all! The best part about this magical fruit is how easy it is to find and prepare - just peel back its outer layer with your fingers until you reach the juicy center where there are seeds inside waiting for us eaters who want something sweet but healthy instead of unhealthy junk food like candy bars which contain sugar which causes obesity problems among children today as well as adults too sometimes due mainly because these kinds lack fiber needed by our digestive systems so we end up feeling tired all day long after eating them over again until finally giving up trying anymore because nothing seems worth doing except sleeping through lunchtime instead staying awake until dinner time when everybody else goes back home again just like normal people do every single night without fail.\"\n",
"## A Magic Furit \n",
"A magic furit is a fruit that can be eaten by anyone and everyone. It has many uses, including being able to make you feel better or heal wounds if they are not severe enough for medical attention (such as cuts). There are two types of this type of fruit: those with seeds inside them like apples; and those without any type at all! The most common kind is called \"magic apple\", but there are also other names such as \"sweet potato\" which comes from its ability to give off a sweet smell when it's cooked properly over an open fire.\""
]
},
{
"cell_type": "markdown",
"id": "0ceb8525-aca6-4871-9c02-ed3776b17bcb",
"metadata": {
"litchi:message:role": "assistant"
},
"source": [
" \n",
"\n",
"## A Magic furit \n",
"There are some of my favorite fruit. What's yours ?\n",
"\n",
"### A Magic fruit \n",
"The fruit of the tree is edible and it tastes delicious. The leaves can also be used as medicine for a wide range of illnesses.\n",
"\n",
"#### A magic fruit \n",
"It has many benefits such as improving memory, reducing stress levels, preventing cancer cells from growing in the body, etc.\n",
"\n",
"##### A Magic Fruits\n",
"This is one of my favorite fruits because I love its flavor and it's healthy too! \n",
"\n",
"###### A Magic Fruit\n",
"I think there are some people who will eat anything when they're hungry enough. That being said, this fruit is probably not good for you. It contains a lot of sugar which can cause serious health problems if eaten in large amounts.\n",
"\n",
"### The fruit of the tree\n",
"The fruit of the tree is edible and it tastes delicious. The leaves can also be used as medicine for a wide range of illnesses. \n",
"\n",
"#### Leaves \n",
"This plant has been used by many cultures throughout history to cure different types of diseases. Some examples include: headaches, insomnia, arthritis pain relief, digestive issues such as diarrhea or constipation, heartburn, ulcers, etc.\n",
"\n",
"##### The leaves\n",
"The tree also provides shade during hot summer days while still allowing sunlight through its canopy so you don't get sunburned! \n",
"\n",
"###### Leaves \n",
"Leaves are often dried and used in tea blends because they contain antioxidants that help fight free radicals found naturally within our bodies. These chemicals cause damage to cells over time leading to aging skin or other issues such as wrinkles.\n",
"\n",
"##### The leaves\n",
"The tree also provides shade during hot summer days while still allowing sunlight through its canopy so you don't get sunburned! \n",
"\n",
"###### Leaves \n",
"Leaves are often dried and used in tea blends because they contain antioxidants that help fight free radicals found naturally within our bodies. These chemicals cause damage to cells over time leading to aging skin or other issues such as wrinkles.\n",
"\n",
"##### The leaves\n",
"The tree also provides shade during hot summer days while still allowing sunlight through its canopy so you don't get sunburned! \n",
"\n",
"###### Leaves \n",
"Leaves are often dried and used in tea blends because they contain antioxidants that help fight free radicals found naturally within our bodies. These chemicals cause damage to cells over time leading to aging skin or other issues such as wrinkles.\n",
"\n",
"## Magic Fruit\n",
"There is a fruit called \"magic\" which can be eaten by humans and animals alike without any ill effects. It has many health benefits including improving memory, reducing stress levels, preventing cancer cells from growing in the body etc...\n",
"\n",
"### The magic fruit \n",
"The magical fruit was created thousands of years ago when some unknown scientist discovered its properties while experimenting with different types of food. He then shared this information with other scientists who also conducted experiments on animals before trying it themselves. \n",
"\n",
"#### Experiments \n",
"In one experiment, they fed rats chocolate every day for two weeks and noticed that their weight increased significantly even though they were getting less calories than normal people do. The researchers concluded that the fat content in chocolates is what makes them so addictive!\n",
"\n",
"##### Chocolate\n",
"The magic fruit has a sweet taste but it doesn't contain much sugar unlike most other fruits which are high in carbohydrates (sugar). This means that you won't get any side effects from eating too much of this fruit because there isn't enough glucose present to cause problems like diabetes or obesity.\n",
"\n",
"###### Eating too much \n",
"Eating large quantities of this fruit over time may lead to negative consequences such as gaining weight and developing type 2 Diabetes Mellitus (T2DM). However, if you limit yourself to just one serving per day then you shouldn't experience any adverse effects whatsoever!"
]
},
{
"cell_type": "markdown",
"id": "2b015bf0-a303-4aaa-a8da-848f62970e3e",
"metadata": {},
"metadata": {
"litchi:message:role": "user"
},
"source": [
"Lychee (Litchi chinensis), also spelled as lichi, is a tropical fruit native to southern China and is one of the oldest cultivated tree species in the world. Here are some interesting facts and information about lychees:\n",
"\n",
Expand Down Expand Up @@ -696,7 +776,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 1,
"id": "48970bfc-6e7d-4e67-aeea-3aca8ecca558",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -803,6 +883,33 @@
"\n",
"这些SVG图像可以直接插入到网页中或用于其他需要图标的场合。如果你需要不同的字体、颜色或大小,可以调整SVG代码中的相应属性。"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "d8bf38e5-6209-4bb5-83b6-2704bcc2ac86",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<svg width=\"100\" height=\"100\" xmlns=\"http://www.w3.org/2000/svg\">\n",
" <text x=\"0\" y=\"8\" font-family=\"Arial\" fill=\"black\">CA</text>\n",
"</svg>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"display(HTML(\"\"\"<svg width=\"100\" height=\"100\" xmlns=\"http://www.w3.org/2000/svg\">\n",
" <text x=\"0\" y=\"8\" font-family=\"Arial\" font-size=\"8\" fill=\"black\">CA</text>\n",
"</svg>\"\"\"))"
]
}
],
"metadata": {
Expand Down
2 changes: 1 addition & 1 deletion jupyter_litchi/labextension/build_log.json
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@
"singleton": true
},
"jupyter-litchi": {
"version": "0.3.8",
"version": "0.4.0",
"singleton": true,
"import": "/Users/mars/jobs/litchi/lib/index.js"
}
Expand Down
4 changes: 2 additions & 2 deletions jupyter_litchi/labextension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jupyter-litchi",
"version": "0.3.8",
"version": "0.4.0",
"description": "A JupyterLab extension.",
"keywords": [
"jupyter",
Expand Down Expand Up @@ -105,7 +105,7 @@
"outputDir": "jupyter_litchi/labextension",
"schemaDir": "schema",
"_build": {
"load": "static/remoteEntry.7ce0991261d6542d065b.js",
"load": "static/remoteEntry.677dbfaa6cac36bff0d7.js",
"extension": "./extension",
"style": "./style"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,7 @@
]
},
"jupyter.lab.toolbars": {
"Litchi": [
{
"name": "litchi-chat",
"command": "litchi:chat",
"icon": "litchi-ca",
"rank": 1
},
{
"name": "litchi-contextual",
"command": "litchi:contextual",
"icon": "litchi-ct",
"rank": 1
},
{
"name": "litchi-historical",
"command": "litchi:historical",
"icon": "litchi-ch",
"rank": 1
},
{
"name": "litchi-selected",
"command": "litchi:selected",
"icon": "litchi-cs",
"rank": 1
}
"Notebook": [
]
},
"properties": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jupyter-litchi",
"version": "0.3.8",
"version": "0.4.0",
"description": "A JupyterLab extension.",
"keywords": [
"jupyter",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,5 @@
"type": "object",
"properties": {
},
"additionalProperties": false,
"jupyter.lab.toolbars": {
"Litchi": [
]
}
"additionalProperties": false
}

This file was deleted.

Loading

0 comments on commit 99838c1

Please sign in to comment.