Compare commits
10 Commits
a1db229cb3
...
f8cfd629e0
Author | SHA1 | Date | |
---|---|---|---|
f8cfd629e0 | |||
![]() |
db2e9a68ef | ||
![]() |
b925dc00f0 | ||
![]() |
f0a5de5e75 | ||
![]() |
2e61f226b0 | ||
![]() |
44a91638d2 | ||
![]() |
c53fa636c1 | ||
![]() |
c9340304b9 | ||
![]() |
846bc3b13e | ||
![]() |
ff11a42bd5 |
@ -32,7 +32,7 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: Deploy webvm
|
name: Deploy webvm
|
||||||
command: |
|
command: |
|
||||||
rsync -avz -e "ssh -p ${SSH_PORT}" webvm/build/ leaningtech@${SSH_HOST}:/srv/web/webvm/
|
rsync -avz --chown circleci:runtimes webvm/build/ circleci@$havana.leaningtech.com:webvm/
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
deploy:
|
deploy:
|
||||||
|
31
README.md
31
README.md
@ -143,6 +143,37 @@ index 2878332..1f3103a 100644
|
|||||||
+CMD [ "/usr/bin/python3" ]
|
+CMD [ "/usr/bin/python3" ]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# How to use Claude AI
|
||||||
|
|
||||||
|
To access Claude AI, you need an API key. Follow these steps to get started:
|
||||||
|
|
||||||
|
1. Create an account
|
||||||
|
- Visit [Anthropic Console](https://console.anthropic.com/login) and sign up with your e-mail. You'll receive a sign in link to the Anthropic Console.
|
||||||
|
|
||||||
|
<img src="/assets/anthropic_signup.png" width="90%">
|
||||||
|
|
||||||
|
2. Get your API key
|
||||||
|
- Once logged in, navigate to **Get API keys**.
|
||||||
|
- Purchase the amount of credits you need. After completing the purchase, you'll be able to generate the key through the API console.
|
||||||
|
|
||||||
|
<img src="/assets/anthropic_api_payment.png" width="90%">
|
||||||
|
|
||||||
|
3. Log in with your API key
|
||||||
|
- Navigate to your WebVM and hover over the robot icon. This will show the Claude AI Integration tab. For added convenience, you can click the pin button in the top right corner to keep the tab in place.
|
||||||
|
- You'll see a prompt where you can insert your Claude API key.
|
||||||
|
- Insert your key and press enter.
|
||||||
|
|
||||||
|
<img src="/assets/insert_key.png" width="90%">
|
||||||
|
|
||||||
|
4. Start using Claude AI
|
||||||
|
- Once your API key is entered, you can begin interacting with Claude AI by asking questions such as:
|
||||||
|
|
||||||
|
__"Solve the CTF challenge at `/home/user/chall1.bin.` Note that the binary reads from stdin."__
|
||||||
|
|
||||||
|
<img src="/assets/webvm_claude_ctf.gif" alt="deploy_instructions_gif" width="90%">
|
||||||
|
|
||||||
|
**Important:** Your API key is private and should never be shared. We do not have access to your key, which is not only stored locally in your browser.
|
||||||
|
|
||||||
# Bugs and Issues
|
# Bugs and Issues
|
||||||
|
|
||||||
Please use [Issues](https://github.com/leaningtech/webvm/issues) to report any bug.
|
Please use [Issues](https://github.com/leaningtech/webvm/issues) to report any bug.
|
||||||
|
BIN
assets/anthropic_api_payment.png
Normal file
BIN
assets/anthropic_api_payment.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 127 KiB |
BIN
assets/anthropic_signup.png
Normal file
BIN
assets/anthropic_signup.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 92 KiB |
BIN
assets/insert_key.png
Normal file
BIN
assets/insert_key.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 309 KiB |
BIN
assets/webvm_claude_ctf.gif
Normal file
BIN
assets/webvm_claude_ctf.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.3 MiB |
@ -1,7 +1,7 @@
|
|||||||
// The root filesystem location
|
// The root filesystem location
|
||||||
export const diskImageUrl = "wss://disks.webvm.io/debian_large_20230522_5044875331.ext2";
|
export const diskImageUrl = "/disk-images/debian_large_20230522_5044875331.ext2";
|
||||||
// The root filesystem backend type
|
// The root filesystem backend type
|
||||||
export const diskImageType = "cloud";
|
export const diskImageType = "bytes";
|
||||||
// Print an introduction message about the technology
|
// Print an introduction message about the technology
|
||||||
export const printIntro = true;
|
export const printIntro = true;
|
||||||
// Is a graphical display needed
|
// Is a graphical display needed
|
||||||
|
190
package-lock.json
generated
190
package-lock.json
generated
@ -514,9 +514,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@leaningtech/cheerpx": {
|
"node_modules/@leaningtech/cheerpx": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@leaningtech/cheerpx/-/cheerpx-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@leaningtech/cheerpx/-/cheerpx-1.1.2.tgz",
|
||||||
"integrity": "sha512-NCEwwEhkYu7E0KdWQtlJfdmP+qv+vPNlBmyz9+Fc2nWNVbMAd2eKzZ/2KRYfYHvCmaBNcQ2KvT9Qik7KYPp5ig==",
|
"integrity": "sha512-ySdihxmanhLaE2Mb3sFNzedm6UI9ofJMC5x4ylqAHf2YlR4cFBHgfr+rDLK7pg3ay4QyQTYu93MEQ045pcV8zw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@nodelib/fs.scandir": {
|
"node_modules/@nodelib/fs.scandir": {
|
||||||
@ -577,9 +577,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-android-arm-eabi": {
|
"node_modules/@rollup/rollup-android-arm-eabi": {
|
||||||
"version": "4.35.0",
|
"version": "4.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.36.0.tgz",
|
||||||
"integrity": "sha512-uYQ2WfPaqz5QtVgMxfN6NpLD+no0MYHDBywl7itPYd3K5TjjSghNKmX8ic9S8NU8w81NVhJv/XojcHptRly7qQ==",
|
"integrity": "sha512-jgrXjjcEwN6XpZXL0HUeOVGfjXhPyxAbbhD0BlXUB+abTOpbPiN5Wb3kOT7yb+uEtATNYF5x5gIfwutmuBA26w==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
@ -590,9 +590,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-android-arm64": {
|
"node_modules/@rollup/rollup-android-arm64": {
|
||||||
"version": "4.35.0",
|
"version": "4.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.36.0.tgz",
|
||||||
"integrity": "sha512-FtKddj9XZudurLhdJnBl9fl6BwCJ3ky8riCXjEw3/UIbjmIY58ppWwPEvU3fNu+W7FUsAsB1CdH+7EQE6CXAPA==",
|
"integrity": "sha512-NyfuLvdPdNUfUNeYKUwPwKsE5SXa2J6bCt2LdB/N+AxShnkpiczi3tcLJrm5mA+eqpy0HmaIY9F6XCa32N5yzg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@ -603,9 +603,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-darwin-arm64": {
|
"node_modules/@rollup/rollup-darwin-arm64": {
|
||||||
"version": "4.35.0",
|
"version": "4.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.36.0.tgz",
|
||||||
"integrity": "sha512-Uk+GjOJR6CY844/q6r5DR/6lkPFOw0hjfOIzVx22THJXMxktXG6CbejseJFznU8vHcEBLpiXKY3/6xc+cBm65Q==",
|
"integrity": "sha512-JQ1Jk5G4bGrD4pWJQzWsD8I1n1mgPXq33+/vP4sk8j/z/C2siRuxZtaUA7yMTf71TCZTZl/4e1bfzwUmFb3+rw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@ -616,9 +616,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-darwin-x64": {
|
"node_modules/@rollup/rollup-darwin-x64": {
|
||||||
"version": "4.35.0",
|
"version": "4.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.36.0.tgz",
|
||||||
"integrity": "sha512-3IrHjfAS6Vkp+5bISNQnPogRAW5GAV1n+bNCrDwXmfMHbPl5EhTmWtfmwlJxFRUCBZ+tZ/OxDyU08aF6NI/N5Q==",
|
"integrity": "sha512-6c6wMZa1lrtiRsbDziCmjE53YbTkxMYhhnWnSW8R/yqsM7a6mSJ3uAVT0t8Y/DGt7gxUWYuFM4bwWk9XCJrFKA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@ -629,9 +629,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-freebsd-arm64": {
|
"node_modules/@rollup/rollup-freebsd-arm64": {
|
||||||
"version": "4.35.0",
|
"version": "4.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.36.0.tgz",
|
||||||
"integrity": "sha512-sxjoD/6F9cDLSELuLNnY0fOrM9WA0KrM0vWm57XhrIMf5FGiN8D0l7fn+bpUeBSU7dCgPV2oX4zHAsAXyHFGcQ==",
|
"integrity": "sha512-KXVsijKeJXOl8QzXTsA+sHVDsFOmMCdBRgFmBb+mfEb/7geR7+C8ypAml4fquUt14ZyVXaw2o1FWhqAfOvA4sg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@ -642,9 +642,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-freebsd-x64": {
|
"node_modules/@rollup/rollup-freebsd-x64": {
|
||||||
"version": "4.35.0",
|
"version": "4.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.36.0.tgz",
|
||||||
"integrity": "sha512-2mpHCeRuD1u/2kruUiHSsnjWtHjqVbzhBkNVQ1aVD63CcexKVcQGwJ2g5VphOd84GvxfSvnnlEyBtQCE5hxVVw==",
|
"integrity": "sha512-dVeWq1ebbvByI+ndz4IJcD4a09RJgRYmLccwlQ8bPd4olz3Y213uf1iwvc7ZaxNn2ab7bjc08PrtBgMu6nb4pQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@ -655,9 +655,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
|
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
|
||||||
"version": "4.35.0",
|
"version": "4.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.36.0.tgz",
|
||||||
"integrity": "sha512-mrA0v3QMy6ZSvEuLs0dMxcO2LnaCONs1Z73GUDBHWbY8tFFocM6yl7YyMu7rz4zS81NDSqhrUuolyZXGi8TEqg==",
|
"integrity": "sha512-bvXVU42mOVcF4le6XSjscdXjqx8okv4n5vmwgzcmtvFdifQ5U4dXFYaCB87namDRKlUL9ybVtLQ9ztnawaSzvg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
@ -668,9 +668,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
|
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
|
||||||
"version": "4.35.0",
|
"version": "4.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.36.0.tgz",
|
||||||
"integrity": "sha512-DnYhhzcvTAKNexIql8pFajr0PiDGrIsBYPRvCKlA5ixSS3uwo/CWNZxB09jhIapEIg945KOzcYEAGGSmTSpk7A==",
|
"integrity": "sha512-JFIQrDJYrxOnyDQGYkqnNBtjDwTgbasdbUiQvcU8JmGDfValfH1lNpng+4FWlhaVIR4KPkeddYjsVVbmJYvDcg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
@ -681,9 +681,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-arm64-gnu": {
|
"node_modules/@rollup/rollup-linux-arm64-gnu": {
|
||||||
"version": "4.35.0",
|
"version": "4.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.36.0.tgz",
|
||||||
"integrity": "sha512-uagpnH2M2g2b5iLsCTZ35CL1FgyuzzJQ8L9VtlJ+FckBXroTwNOaD0z0/UF+k5K3aNQjbm8LIVpxykUOQt1m/A==",
|
"integrity": "sha512-KqjYVh3oM1bj//5X7k79PSCZ6CvaVzb7Qs7VMWS+SlWB5M8p3FqufLP9VNp4CazJ0CsPDLwVD9r3vX7Ci4J56A==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@ -694,9 +694,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-arm64-musl": {
|
"node_modules/@rollup/rollup-linux-arm64-musl": {
|
||||||
"version": "4.35.0",
|
"version": "4.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.36.0.tgz",
|
||||||
"integrity": "sha512-XQxVOCd6VJeHQA/7YcqyV0/88N6ysSVzRjJ9I9UA/xXpEsjvAgDTgH3wQYz5bmr7SPtVK2TsP2fQ2N9L4ukoUg==",
|
"integrity": "sha512-QiGnhScND+mAAtfHqeT+cB1S9yFnNQ/EwCg5yE3MzoaZZnIV0RV9O5alJAoJKX/sBONVKeZdMfO8QSaWEygMhw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@ -707,9 +707,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-loongarch64-gnu": {
|
"node_modules/@rollup/rollup-linux-loongarch64-gnu": {
|
||||||
"version": "4.35.0",
|
"version": "4.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.36.0.tgz",
|
||||||
"integrity": "sha512-5pMT5PzfgwcXEwOaSrqVsz/LvjDZt+vQ8RT/70yhPU06PTuq8WaHhfT1LW+cdD7mW6i/J5/XIkX/1tCAkh1W6g==",
|
"integrity": "sha512-1ZPyEDWF8phd4FQtTzMh8FQwqzvIjLsl6/84gzUxnMNFBtExBtpL51H67mV9xipuxl1AEAerRBgBwFNpkw8+Lg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"loong64"
|
"loong64"
|
||||||
],
|
],
|
||||||
@ -720,9 +720,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
|
"node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
|
||||||
"version": "4.35.0",
|
"version": "4.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.36.0.tgz",
|
||||||
"integrity": "sha512-c+zkcvbhbXF98f4CtEIP1EBA/lCic5xB0lToneZYvMeKu5Kamq3O8gqrxiYYLzlZH6E3Aq+TSW86E4ay8iD8EA==",
|
"integrity": "sha512-VMPMEIUpPFKpPI9GZMhJrtu8rxnp6mJR3ZzQPykq4xc2GmdHj3Q4cA+7avMyegXy4n1v+Qynr9fR88BmyO74tg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ppc64"
|
"ppc64"
|
||||||
],
|
],
|
||||||
@ -733,9 +733,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
|
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
|
||||||
"version": "4.35.0",
|
"version": "4.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.36.0.tgz",
|
||||||
"integrity": "sha512-s91fuAHdOwH/Tad2tzTtPX7UZyytHIRR6V4+2IGlV0Cej5rkG0R61SX4l4y9sh0JBibMiploZx3oHKPnQBKe4g==",
|
"integrity": "sha512-ttE6ayb/kHwNRJGYLpuAvB7SMtOeQnVXEIpMtAvx3kepFQeowVED0n1K9nAdraHUPJ5hydEMxBpIR7o4nrm8uA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"riscv64"
|
"riscv64"
|
||||||
],
|
],
|
||||||
@ -746,9 +746,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-s390x-gnu": {
|
"node_modules/@rollup/rollup-linux-s390x-gnu": {
|
||||||
"version": "4.35.0",
|
"version": "4.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.36.0.tgz",
|
||||||
"integrity": "sha512-hQRkPQPLYJZYGP+Hj4fR9dDBMIM7zrzJDWFEMPdTnTy95Ljnv0/4w/ixFw3pTBMEuuEuoqtBINYND4M7ujcuQw==",
|
"integrity": "sha512-4a5gf2jpS0AIe7uBjxDeUMNcFmaRTbNv7NxI5xOCs4lhzsVyGR/0qBXduPnoWf6dGC365saTiwag8hP1imTgag==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"s390x"
|
"s390x"
|
||||||
],
|
],
|
||||||
@ -759,9 +759,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-x64-gnu": {
|
"node_modules/@rollup/rollup-linux-x64-gnu": {
|
||||||
"version": "4.35.0",
|
"version": "4.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.36.0.tgz",
|
||||||
"integrity": "sha512-Pim1T8rXOri+0HmV4CdKSGrqcBWX0d1HoPnQ0uw0bdp1aP5SdQVNBy8LjYncvnLgu3fnnCt17xjWGd4cqh8/hA==",
|
"integrity": "sha512-5KtoW8UWmwFKQ96aQL3LlRXX16IMwyzMq/jSSVIIyAANiE1doaQsx/KRyhAvpHlPjPiSU/AYX/8m+lQ9VToxFQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@ -772,9 +772,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-x64-musl": {
|
"node_modules/@rollup/rollup-linux-x64-musl": {
|
||||||
"version": "4.35.0",
|
"version": "4.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.36.0.tgz",
|
||||||
"integrity": "sha512-QysqXzYiDvQWfUiTm8XmJNO2zm9yC9P/2Gkrwg2dH9cxotQzunBHYr6jk4SujCTqnfGxduOmQcI7c2ryuW8XVg==",
|
"integrity": "sha512-sycrYZPrv2ag4OCvaN5js+f01eoZ2U+RmT5as8vhxiFz+kxwlHrsxOwKPSA8WyS+Wc6Epid9QeI/IkQ9NkgYyQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@ -785,9 +785,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-win32-arm64-msvc": {
|
"node_modules/@rollup/rollup-win32-arm64-msvc": {
|
||||||
"version": "4.35.0",
|
"version": "4.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.36.0.tgz",
|
||||||
"integrity": "sha512-OUOlGqPkVJCdJETKOCEf1mw848ZyJ5w50/rZ/3IBQVdLfR5jk/6Sr5m3iO2tdPgwo0x7VcncYuOvMhBWZq8ayg==",
|
"integrity": "sha512-qbqt4N7tokFwwSVlWDsjfoHgviS3n/vZ8LK0h1uLG9TYIRuUTJC88E1xb3LM2iqZ/WTqNQjYrtmtGmrmmawB6A==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@ -798,9 +798,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-win32-ia32-msvc": {
|
"node_modules/@rollup/rollup-win32-ia32-msvc": {
|
||||||
"version": "4.35.0",
|
"version": "4.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.36.0.tgz",
|
||||||
"integrity": "sha512-2/lsgejMrtwQe44glq7AFFHLfJBPafpsTa6JvP2NGef/ifOa4KBoglVf7AKN7EV9o32evBPRqfg96fEHzWo5kw==",
|
"integrity": "sha512-t+RY0JuRamIocMuQcfwYSOkmdX9dtkr1PbhKW42AMvaDQa+jOdpUYysroTF/nuPpAaQMWp7ye+ndlmmthieJrQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ia32"
|
"ia32"
|
||||||
],
|
],
|
||||||
@ -811,9 +811,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
||||||
"version": "4.35.0",
|
"version": "4.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.36.0.tgz",
|
||||||
"integrity": "sha512-PIQeY5XDkrOysbQblSW7v3l1MDZzkTEzAfTPkj5VAu3FW8fS4ynyLg2sINp0fp3SjZ8xkRYpLqoKcYqAkhU1dw==",
|
"integrity": "sha512-aRXd7tRZkWLqGbChgcMMDEHjOKudo1kChb1Jt1IfR8cY/KIpgNviLeJy5FUb9IpSuQj8dU2fAYNMPW/hLKOSTw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@ -845,9 +845,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@sveltejs/kit": {
|
"node_modules/@sveltejs/kit": {
|
||||||
"version": "2.19.2",
|
"version": "2.20.1",
|
||||||
"resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.19.2.tgz",
|
"resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.20.1.tgz",
|
||||||
"integrity": "sha512-OkW7MMGkjXtdfqdHWlyPozh/Ct1X3pthXAKTSqHm+mwmvmTBASmPE6FhwlvUgsqlCceRYL+5QUGiIJfOy0xIjQ==",
|
"integrity": "sha512-XXd6hQKi9le+8rYIKsxTfgABjB3b8S21qZmMUTvAC5kuVA1AXvYPVEmxrMhRqyOacXu3e6P3ag5HtJi6j9K7UQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/cookie": "^0.6.0",
|
"@types/cookie": "^0.6.0",
|
||||||
@ -1223,9 +1223,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/caniuse-lite": {
|
"node_modules/caniuse-lite": {
|
||||||
"version": "1.0.30001705",
|
"version": "1.0.30001706",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001705.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001706.tgz",
|
||||||
"integrity": "sha512-S0uyMMiYvA7CxNgomYBwwwPUnWzFD83f3B1ce5jHUfHTH//QL6hHsreI8RVC5606R4ssqravelYO5TU6t8sEyg==",
|
"integrity": "sha512-3ZczoTApMAZwPKYWmwVbQMFpXBDds3/0VciVoUwPUbldlYyVLmRVuRs/PcUZtHpbLRpzzDvrvnFuREsGt6lUug==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -1556,9 +1556,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/electron-to-chromium": {
|
"node_modules/electron-to-chromium": {
|
||||||
"version": "1.5.119",
|
"version": "1.5.120",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.119.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.120.tgz",
|
||||||
"integrity": "sha512-Ku4NMzUjz3e3Vweh7PhApPrZSS4fyiCIbcIrG9eKrriYVLmbMepETR/v6SU7xPm98QTqMSYiCwfO89QNjXLkbQ==",
|
"integrity": "sha512-oTUp3gfX1gZI+xfD2djr2rzQdHCwHzPQrrK0CD7WpTdF0nPdQ/INcRVjWgLdCT4a9W3jFObR9DAfsuyFQnI8CQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/emoji-regex": {
|
"node_modules/emoji-regex": {
|
||||||
@ -2138,7 +2138,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/labs": {
|
"node_modules/labs": {
|
||||||
"resolved": "git+ssh://git@github.com/leaningtech/labs.git#1597cc12659deedf1714af5aac573fd3ee2cfc03",
|
"resolved": "git+ssh://git@github.com/leaningtech/labs.git#6bf397f9c8c3a70b425580ab701423a8ed05f360",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/lilconfig": {
|
"node_modules/lilconfig": {
|
||||||
@ -2310,9 +2310,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/nanoid": {
|
"node_modules/nanoid": {
|
||||||
"version": "3.3.10",
|
"version": "3.3.11",
|
||||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.10.tgz",
|
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
|
||||||
"integrity": "sha512-vSJJTG+t/dIKAUhUDw/dLdZ9s//5OxcHqLaDWWrW4Cdq7o6tdLIczUkMXt2MBNmk6sJRZBZRXVixs7URY1CmIg==",
|
"integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -2744,9 +2744,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/rollup": {
|
"node_modules/rollup": {
|
||||||
"version": "4.35.0",
|
"version": "4.36.0",
|
||||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.35.0.tgz",
|
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.36.0.tgz",
|
||||||
"integrity": "sha512-kg6oI4g+vc41vePJyO6dHt/yl0Rz3Thv0kJeVQ3D1kS3E5XSuKbPc29G4IpT/Kv1KQwgHVcN+HtyS+HYLNSvQg==",
|
"integrity": "sha512-zwATAXNQxUcd40zgtQG0ZafcRK4g004WtEl7kbuhTWPvf07PsfohXl39jVUvPF7jvNAIkKPQ2XrsDlWuxBd++Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/estree": "1.0.6"
|
"@types/estree": "1.0.6"
|
||||||
@ -2759,25 +2759,25 @@
|
|||||||
"npm": ">=8.0.0"
|
"npm": ">=8.0.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@rollup/rollup-android-arm-eabi": "4.35.0",
|
"@rollup/rollup-android-arm-eabi": "4.36.0",
|
||||||
"@rollup/rollup-android-arm64": "4.35.0",
|
"@rollup/rollup-android-arm64": "4.36.0",
|
||||||
"@rollup/rollup-darwin-arm64": "4.35.0",
|
"@rollup/rollup-darwin-arm64": "4.36.0",
|
||||||
"@rollup/rollup-darwin-x64": "4.35.0",
|
"@rollup/rollup-darwin-x64": "4.36.0",
|
||||||
"@rollup/rollup-freebsd-arm64": "4.35.0",
|
"@rollup/rollup-freebsd-arm64": "4.36.0",
|
||||||
"@rollup/rollup-freebsd-x64": "4.35.0",
|
"@rollup/rollup-freebsd-x64": "4.36.0",
|
||||||
"@rollup/rollup-linux-arm-gnueabihf": "4.35.0",
|
"@rollup/rollup-linux-arm-gnueabihf": "4.36.0",
|
||||||
"@rollup/rollup-linux-arm-musleabihf": "4.35.0",
|
"@rollup/rollup-linux-arm-musleabihf": "4.36.0",
|
||||||
"@rollup/rollup-linux-arm64-gnu": "4.35.0",
|
"@rollup/rollup-linux-arm64-gnu": "4.36.0",
|
||||||
"@rollup/rollup-linux-arm64-musl": "4.35.0",
|
"@rollup/rollup-linux-arm64-musl": "4.36.0",
|
||||||
"@rollup/rollup-linux-loongarch64-gnu": "4.35.0",
|
"@rollup/rollup-linux-loongarch64-gnu": "4.36.0",
|
||||||
"@rollup/rollup-linux-powerpc64le-gnu": "4.35.0",
|
"@rollup/rollup-linux-powerpc64le-gnu": "4.36.0",
|
||||||
"@rollup/rollup-linux-riscv64-gnu": "4.35.0",
|
"@rollup/rollup-linux-riscv64-gnu": "4.36.0",
|
||||||
"@rollup/rollup-linux-s390x-gnu": "4.35.0",
|
"@rollup/rollup-linux-s390x-gnu": "4.36.0",
|
||||||
"@rollup/rollup-linux-x64-gnu": "4.35.0",
|
"@rollup/rollup-linux-x64-gnu": "4.36.0",
|
||||||
"@rollup/rollup-linux-x64-musl": "4.35.0",
|
"@rollup/rollup-linux-x64-musl": "4.36.0",
|
||||||
"@rollup/rollup-win32-arm64-msvc": "4.35.0",
|
"@rollup/rollup-win32-arm64-msvc": "4.36.0",
|
||||||
"@rollup/rollup-win32-ia32-msvc": "4.35.0",
|
"@rollup/rollup-win32-ia32-msvc": "4.36.0",
|
||||||
"@rollup/rollup-win32-x64-msvc": "4.35.0",
|
"@rollup/rollup-win32-x64-msvc": "4.36.0",
|
||||||
"fsevents": "~2.3.2"
|
"fsevents": "~2.3.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
21
src/app.html
21
src/app.html
@ -1,28 +1,11 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="zh-CN">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<title>WebVM - Linux virtualization in WebAssembly</title>
|
<title>WebVM(o゜▽゜)o☆</title>
|
||||||
|
|
||||||
<meta name="description" content="Linux virtual machine, running in the browser via HTML5/WebAssembly. Networking and graphics supported.">
|
|
||||||
<meta name="keywords" content="WebVM, Virtual Machine, CheerpX, x86 virtualization, WebAssembly, Tailscale, JIT">
|
|
||||||
<meta property="og:title" content="WebVM - Linux virtualization in WebAssembly" />
|
|
||||||
<meta property="og:type" content="website" />
|
|
||||||
<meta property="og:site_name" content="WebVM"/>
|
|
||||||
<meta property="og:image" content="https://webvm.io/assets/social_2024.png" />
|
|
||||||
<meta name="twitter:card" content="summary_large_image" />
|
|
||||||
<meta name="twitter:site" content="@leaningtech" />
|
|
||||||
<meta name="twitter:title" content="WebVM - Linux virtualization in WebAssembly" />
|
|
||||||
<meta name="twitter:description" content="Linux virtual machine, running in the browser via HTML5/WebAssembly. Networking and graphics supported.">
|
|
||||||
<meta name="twitter:image" content="https://webvm.io/assets/social_2024.png" />
|
|
||||||
|
|
||||||
<!-- Apple iOS web clip compatibility tags -->
|
<!-- Apple iOS web clip compatibility tags -->
|
||||||
<meta name="application-name" content="WebVM" />
|
|
||||||
<meta name="apple-mobile-web-app-title" content="WebVM" />
|
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
||||||
<meta name="mobile-web-app-capable" content="yes" />
|
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
|
||||||
<link rel="shortcut icon" href="tower.ico">
|
<link rel="shortcut icon" href="tower.ico">
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
@ -77,11 +77,11 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<h1 class="text-lg font-bold">Claude AI Integration</h1>
|
<h1 class="text-lg font-bold">Claude AI Integration</h1>
|
||||||
<p>WebVM is integrated with Claude by Anthropic AI. You can prompt the AI to control the system.</p>
|
<p>WebVM使用Anthropic AI与Claude集成。你可以用AI控制系统。</p>
|
||||||
<p>You need to provide your API key. The key is only saved locally to your browser.</p>
|
<p>您需要提供您的API密钥。密钥仅在浏览器中本地保存。</p>
|
||||||
<div class="flex grow flex-col overflow-y-hidden gap-2">
|
<div class="flex grow flex-col overflow-y-hidden gap-2">
|
||||||
<p class="flex flex-row gap-2">
|
<p class="flex flex-row gap-2">
|
||||||
<span class="mr-auto flex items-center">Conversation history</span>
|
<span class="mr-auto flex items-center">对话历史</span>
|
||||||
<SmallButton buttonIcon="fa-solid fa-download" clickHandler={handleDownload} buttonTooltip="Save conversation as image"></SmallButton>
|
<SmallButton buttonIcon="fa-solid fa-download" clickHandler={handleDownload} buttonTooltip="Save conversation as image"></SmallButton>
|
||||||
<SmallButton buttonIcon="fa-solid fa-brain" clickHandler={toggleThinkingMode} buttonTooltip="{$enableThinking ? "Disable" : "Enable"} thinking mode" bgColor={$enableThinking ? "bg-neutral-500" : "bg-neutral-700"}></SmallButton>
|
<SmallButton buttonIcon="fa-solid fa-brain" clickHandler={toggleThinkingMode} buttonTooltip="{$enableThinking ? "Disable" : "Enable"} thinking mode" bgColor={$enableThinking ? "bg-neutral-500" : "bg-neutral-700"}></SmallButton>
|
||||||
<SmallButton buttonIcon="fa-solid fa-trash-can" clickHandler={clearMessageHistory} buttonTooltip="Clear conversation history"></SmallButton>
|
<SmallButton buttonIcon="fa-solid fa-trash-can" clickHandler={clearMessageHistory} buttonTooltip="Clear conversation history"></SmallButton>
|
||||||
@ -102,7 +102,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{#if $apiState == "KEY_REQUIRED"}
|
{#if $apiState == "KEY_REQUIRED"}
|
||||||
<textarea class="bg-neutral-700 p-2 rounded-md placeholder-gray-400 resize-none shrink-0" placeholder="Insert your Claude API Key" rows="1" on:keydown={handleKeyEnter} on:input={handleResize} id="ai-input"/>
|
<textarea class="bg-neutral-700 p-2 rounded-md placeholder-gray-400 resize-none shrink-0" placeholder="在此输入您的Claude API密钥" rows="1" on:keydown={handleKeyEnter} on:input={handleResize} id="ai-input"/>
|
||||||
{:else if $aiActivity}
|
{:else if $aiActivity}
|
||||||
{#if stopRequested }
|
{#if stopRequested }
|
||||||
<PanelButton buttonIcon="fa-solid fa-hand" buttonText="Stopping...">
|
<PanelButton buttonIcon="fa-solid fa-hand" buttonText="Stopping...">
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<h1 class="text-lg font-bold">Engine</h1>
|
<h1 class="text-lg font-bold">Engine</h1>
|
||||||
<PanelButton buttonImage="assets/cheerpx.svg" clickUrl="https://cheerpx.io/docs" buttonText="Explore CheerpX">
|
<PanelButton buttonImage="assets/cheerpx.svg" clickUrl="https://cheerpx.io/docs" buttonText="Explore CheerpX">
|
||||||
</PanelButton>
|
</PanelButton>
|
||||||
<p><span class="font-bold">Virtual CPU: </span>{$cpuPercentage}%</p>
|
<p><span class="font-bold">虚拟CPU占用: </span>{$cpuPercentage}%</p>
|
||||||
<p>CheerpX is a x86 virtualization engine in WebAssembly</p>
|
<p>CheerpX是运行于WebAssembly的一个x86虚拟化引擎</p>
|
||||||
<p>It can securely run unmodified x86 binaries and libraries in the browser</p>
|
<p>它可以在浏览器中安全地运行未经修改的x86二进制文件和库</p>
|
||||||
<p>Excited about our technology? <a class="underline" href="https://cheerpx.io/docs/getting-started" target="_blank">Start building</a> your projects using <a class="underline" href="https://cheerpx.io/" target="_blank">CheerpX</a> today!</p>
|
<p>对这个技术感兴趣吗?<a class="underline" href="https://cheerpx.io/docs/getting-started" target="_blank">点此开始构建</a> 你的项目————使用 <a class="underline" href="https://cheerpx.io/" target="_blank">CheerpX</a> </p>
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
<script>
|
|
||||||
import PanelButton from './PanelButton.svelte';
|
|
||||||
import DiscordPresenceCount from 'labs/packages/astro-theme/components/nav/DiscordPresenceCount.svelte'
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<h1 class="text-lg font-bold">Discord</h1>
|
|
||||||
<PanelButton buttonImage="assets/discord-mark-blue.svg" clickUrl="https://discord.gg/yTNZgySKGa" buttonText="Join our Discord">
|
|
||||||
<i class='fas fa-circle fa-xs ml-auto text-green-500'></i>
|
|
||||||
<span class="ml-1"><DiscordPresenceCount /></span>
|
|
||||||
</PanelButton>
|
|
||||||
<p>Do you have any question about WebVM or CheerpX?</p>
|
|
||||||
<p>Join our community, we are happy to help!</p>
|
|
@ -1,62 +0,0 @@
|
|||||||
<script>
|
|
||||||
import PanelButton from './PanelButton.svelte';
|
|
||||||
import { createEventDispatcher } from 'svelte';
|
|
||||||
import { diskLatency } from './activities.js'
|
|
||||||
var dispatch = createEventDispatcher();
|
|
||||||
let state = "START";
|
|
||||||
function handleReset()
|
|
||||||
{
|
|
||||||
if(state == "START")
|
|
||||||
state = "CONFIRM";
|
|
||||||
else if (state == "CONFIRM") {
|
|
||||||
state = "RESETTING";
|
|
||||||
dispatch('reset');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function getButtonText(state)
|
|
||||||
{
|
|
||||||
if(state == "START")
|
|
||||||
return "Reset disk";
|
|
||||||
else if (state == "RESETTING")
|
|
||||||
return "Resetting...";
|
|
||||||
else
|
|
||||||
return "Reset disk. Confirm?";
|
|
||||||
}
|
|
||||||
function getBgColor(state)
|
|
||||||
{
|
|
||||||
if(state == "START")
|
|
||||||
{
|
|
||||||
// Use default
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return "bg-red-900";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function getHoverColor(state)
|
|
||||||
{
|
|
||||||
if(state == "START")
|
|
||||||
{
|
|
||||||
// Use default
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return "hover:bg-red-700";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<h1 class="text-lg font-bold">Disk</h1>
|
|
||||||
<PanelButton buttonIcon="fa-solid fa-trash-can" clickHandler={handleReset} buttonText={getButtonText(state)} bgColor={getBgColor(state)} hoverColor={getHoverColor(state)}>
|
|
||||||
</PanelButton>
|
|
||||||
{#if state == "CONFIRM"}
|
|
||||||
<p><span class="font-bold">Warning: </span>WebVM will reload</p>
|
|
||||||
{:else if state == "RESETTING"}
|
|
||||||
<p><span class="font-bold">Reset in progress: </span>Please wait...</p>
|
|
||||||
{:else}
|
|
||||||
<p><span class="font-bold">Backend latency: </span>{$diskLatency}ms</p>
|
|
||||||
{/if}
|
|
||||||
<p>WebVM runs on top of a complete Linux distribution</p>
|
|
||||||
<p>Filesystems up to 2GB are supported and data is downloaded completely on-demand</p>
|
|
||||||
<p>The WebVM cloud backend uses WebSockets and a it's distributed via a global CDN to minimize download latency</p>
|
|
@ -1,13 +0,0 @@
|
|||||||
<script>
|
|
||||||
import PanelButton from './PanelButton.svelte';
|
|
||||||
import GitHubStarCount from 'labs/packages/astro-theme/components/nav/GitHubStarCount.svelte'
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<h1 class="text-lg font-bold">GitHub</h1>
|
|
||||||
<PanelButton buttonImage="assets/github-mark-white.svg" clickUrl="https://github.com/leaningtech/webvm" buttonText="GitHub repo">
|
|
||||||
<i class='fas fa-star fa-xs ml-auto'></i>
|
|
||||||
<span class="ml-1"><GitHubStarCount repo="leaningtech/webvm"/></span>
|
|
||||||
</PanelButton>
|
|
||||||
<p>Like WebVM? <a class="underline" href="https://github.com/leaningtech/webvm" target="_blank">Give us a star!</a></p>
|
|
||||||
<p>WebVM is FOSS, you can fork it to build your own version and begin working on your CheerpX-based project</p>
|
|
||||||
<p>Found a bug? Please open a <a class="underline" href="https://github.com/leaningtech/webvm/issues" target="_blank">GitHub issue</a></p>
|
|
@ -1,11 +1,11 @@
|
|||||||
<h1 class="text-lg font-bold">Information</h1>
|
<h1 class="text-lg font-bold">Information</h1>
|
||||||
<img src="assets/webvm_hero.png" alt="WebVM Logo" class="w-56 h-56 object-contain self-center">
|
<img src="assets/webvm_hero.png" alt="WebVM Logo" class="w-56 h-56 object-contain self-center">
|
||||||
<p>WebVM is a virtual Linux environment running in the browser via WebAssembly</p>
|
<p>WebVM是一个通过WebAssembly在浏览器中运行的虚拟Linux环境</p>
|
||||||
<p>It is based on:</p>
|
<p>它基于:</p>
|
||||||
<ul class="list-disc list-inside">
|
<ul class="list-disc list-inside">
|
||||||
<li><a class="underline" target="_blank" href="https://cheerpx.io/">CheerpX</a>: x86 JIT in Wasm</li>
|
<li><a class="underline" target="_blank" href="https://cheerpx.io/">CheerpX</a>: 在Wasm中运行的x86即时编译器</li>
|
||||||
<li><a class="underline" target="_blank" href="https://xtermjs.org/">Xterm.js</a>: interactive terminal</li>
|
<li><a class="underline" target="_blank" href="https://xtermjs.org/">Xterm.js</a>: 交互式终端实现</li>
|
||||||
<li>Local/private <a class="underline" target="_blank" href="https://cheerpx.io/docs/guides/File-System-support">file storage</a></li>
|
<li>Local/private <a class="underline" target="_blank" href="https://cheerpx.io/docs/guides/File-System-support">文件存储实现</a></li>
|
||||||
<li><a class="underline" target="_blank" href="https://cheerpx.io/docs/guides/Networking">Networking</a> via <a class="underline" target="_blank" href="https://tailscale.com/">Tailscale</a></li>
|
<li><a class="underline" target="_blank" href="https://cheerpx.io/docs/guides/Networking">Networking</a> 基于 <a class="underline" target="_blank" href="https://tailscale.com/">Tailscale</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
|
@ -20,5 +20,5 @@
|
|||||||
<i class='fas fa-circle fa-xs ml-auto {$exitNode ? 'text-green-500' : 'text-amber-500'}' title={$exitNode ? 'Ready' : 'No exit node'}></i>
|
<i class='fas fa-circle fa-xs ml-auto {$exitNode ? 'text-green-500' : 'text-amber-500'}' title={$exitNode ? 'Ready' : 'No exit node'}></i>
|
||||||
{/if}
|
{/if}
|
||||||
</PanelButton>
|
</PanelButton>
|
||||||
<p>WebVM can connect to the Internet via Tailscale</p>
|
<p>WebVM可以通过Tailscale连接到互联网</p>
|
||||||
<p>Using Tailscale is required since browser do not support TCP/UDP sockets (yet!)</p>
|
<p>使用Tailscale是必需的,因为浏览器不支持TCP/UDP套接字(目前)</p>
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
<script>
|
|
||||||
import BlogPost from './BlogPost.svelte';
|
|
||||||
import { page } from '$app/stores';
|
|
||||||
</script>
|
|
||||||
<h1 class="text-lg font-bold">Blog posts</h1>
|
|
||||||
<div class="overflow-y-scroll scrollbar flex flex-col gap-2">
|
|
||||||
{#each $page.data.posts as post}
|
|
||||||
<BlogPost
|
|
||||||
title={post.title}
|
|
||||||
image={post.image}
|
|
||||||
url={post.url}
|
|
||||||
/>
|
|
||||||
{/each}
|
|
||||||
</div>
|
|
@ -6,9 +6,6 @@
|
|||||||
import CpuTab from './CpuTab.svelte';
|
import CpuTab from './CpuTab.svelte';
|
||||||
import DiskTab from './DiskTab.svelte';
|
import DiskTab from './DiskTab.svelte';
|
||||||
import AnthropicTab from './AnthropicTab.svelte';
|
import AnthropicTab from './AnthropicTab.svelte';
|
||||||
import PostsTab from './PostsTab.svelte';
|
|
||||||
import DiscordTab from './DiscordTab.svelte';
|
|
||||||
import GitHubTab from './GitHubTab.svelte';
|
|
||||||
import SmallButton from './SmallButton.svelte';
|
import SmallButton from './SmallButton.svelte';
|
||||||
import { cpuActivity, diskActivity, aiActivity } from './activities.js';
|
import { cpuActivity, diskActivity, aiActivity } from './activities.js';
|
||||||
const icons = [
|
const icons = [
|
||||||
@ -18,9 +15,6 @@
|
|||||||
{ icon: 'fas fa-compact-disc', info: 'Disk', activity: diskActivity },
|
{ icon: 'fas fa-compact-disc', info: 'Disk', activity: diskActivity },
|
||||||
{ icon: 'fas fa-robot', info: 'ClaudeAI', activity: aiActivity },
|
{ icon: 'fas fa-robot', info: 'ClaudeAI', activity: aiActivity },
|
||||||
null,
|
null,
|
||||||
{ icon: 'fas fa-book-open', info: 'Posts', activity: null },
|
|
||||||
{ icon: 'fab fa-discord', info: 'Discord', activity: null },
|
|
||||||
{ icon: 'fab fa-github', info: 'GitHub', activity: null },
|
|
||||||
];
|
];
|
||||||
let dispatch = createEventDispatcher();
|
let dispatch = createEventDispatcher();
|
||||||
let activeInfo = null; // Tracks currently visible info.
|
let activeInfo = null; // Tracks currently visible info.
|
||||||
@ -109,12 +103,6 @@
|
|||||||
<DiskTab on:reset/>
|
<DiskTab on:reset/>
|
||||||
{:else if activeInfo === 'ClaudeAI'}
|
{:else if activeInfo === 'ClaudeAI'}
|
||||||
<AnthropicTab handleTool={handleTool} />
|
<AnthropicTab handleTool={handleTool} />
|
||||||
{:else if activeInfo === 'Posts'}
|
|
||||||
<PostsTab/>
|
|
||||||
{:else if activeInfo === 'Discord'}
|
|
||||||
<DiscordTab/>
|
|
||||||
{:else if activeInfo === 'GitHub'}
|
|
||||||
<GitHubTab/>
|
|
||||||
{:else}
|
{:else}
|
||||||
<p>TODO: {activeInfo}</p>
|
<p>TODO: {activeInfo}</p>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { onMount, tick } from 'svelte';
|
import { onMount, tick } from 'svelte';
|
||||||
import { get } from 'svelte/store';
|
import { get } from 'svelte/store';
|
||||||
import Nav from 'labs/packages/global-navbar/src/Nav.svelte';
|
|
||||||
import SideBar from '$lib/SideBar.svelte';
|
import SideBar from '$lib/SideBar.svelte';
|
||||||
import '$lib/global.css';
|
import '$lib/global.css';
|
||||||
import '@xterm/xterm/css/xterm.css'
|
import '@xterm/xterm/css/xterm.css'
|
||||||
@ -361,8 +360,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<main class="relative w-full h-full">
|
<main class="relative w-full h-full">
|
||||||
<Nav />
|
<div class="absolute top-0 bottom-0 left-0 right-0">
|
||||||
<div class="absolute top-10 bottom-0 left-0 right-0">
|
|
||||||
<SideBar on:connect={handleConnect} on:reset={handleReset} handleTool={!configObj.needsDisplay || curVT == 7 ? handleTool : null} on:sidebarPinChange={handleSidebarPinChange}>
|
<SideBar on:connect={handleConnect} on:reset={handleReset} handleTool={!configObj.needsDisplay || curVT == 7 ? handleTool : null} on:sidebarPinChange={handleSidebarPinChange}>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</SideBar>
|
</SideBar>
|
||||||
|
@ -2,55 +2,51 @@ const color= "\x1b[1;35m";
|
|||||||
const underline= "\x1b[94;4m";
|
const underline= "\x1b[94;4m";
|
||||||
const normal= "\x1b[0m";
|
const normal= "\x1b[0m";
|
||||||
export const introMessage = [
|
export const introMessage = [
|
||||||
"+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+",
|
" ",
|
||||||
|
" |\\__/,| (`\\",
|
||||||
|
" _.|o o |_ ) )",
|
||||||
|
"+(((~~~(((~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+",
|
||||||
"| |",
|
"| |",
|
||||||
"| WebVM is a virtual Linux environment running in the browser via WebAssembly |",
|
"| __ ________ ____ __ ____ __ |",
|
||||||
|
"| \\ \\ / / ____| _ \\ \\ \\ / / \\/ | |",
|
||||||
|
"| \\ \\ /\\ / /| |__ | |_) | \\ \\ / /| \\ / | |",
|
||||||
|
"| \\ \\/ \\/ / | __| | _ < \\ \\/ / | |\\/| | |",
|
||||||
|
"| \\ /\\ / | |____| |_) | \\ / | | | | |",
|
||||||
|
"| \\/ \\/ |______|____/ \\/ |_| |_| |",
|
||||||
"| |",
|
"| |",
|
||||||
"| WebVM is powered by the CheerpX virtualization engine, which enables safe, |",
|
"+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+",
|
||||||
"| sandboxed client-side execution of x86 binaries, fully client-side |",
|
|
||||||
"| |",
|
|
||||||
"| CheerpX includes an x86-to-WebAssembly JIT compiler, a virtual block-based |",
|
|
||||||
"| file system, and a Linux syscall emulator |",
|
|
||||||
"| |",
|
|
||||||
"| [News] Our Hackathon is coming! check out the site for updates! |",
|
|
||||||
"| |",
|
|
||||||
"| " + underline + "https://cheerpx.io/hackathon" + normal + " |",
|
|
||||||
"| |",
|
|
||||||
"| AMA alert! Join us Monday, March 17th at 16:00 GMT on Discord for a |",
|
|
||||||
"| live discussion! Don't miss out! |",
|
|
||||||
"| |",
|
|
||||||
"| " + underline + "https://discord.leaningtech.com" + normal + " |",
|
|
||||||
"| |",
|
|
||||||
"+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+",
|
|
||||||
"",
|
"",
|
||||||
" Welcome to WebVM. If unsure, try these examples:",
|
" WebVM是一个通过WebAssembly在浏览器中运行的虚拟Linux环境",
|
||||||
|
"",
|
||||||
|
" 欢迎来到WebVM。我为你准备了一些案例,你可以试着执行下面的命令:",
|
||||||
"",
|
"",
|
||||||
" python3 examples/python3/fibonacci.py ",
|
" python3 examples/python3/fibonacci.py ",
|
||||||
" gcc -o helloworld examples/c/helloworld.c && ./helloworld",
|
" gcc -o helloworld examples/c/helloworld.c && ./helloworld",
|
||||||
" objdump -d ./helloworld | less -M",
|
" objdump -d ./helloworld | less -M",
|
||||||
" vim examples/c/helloworld.c",
|
" vim examples/c/helloworld.c",
|
||||||
" curl --max-time 15 parrot.live # requires networking",
|
" curl --max-time 15 parrot.live # 需要配置网络",
|
||||||
""
|
"",
|
||||||
|
"本系统为Debian,root用户和user用户密码都是password"
|
||||||
];
|
];
|
||||||
export const errorMessage = [
|
export const errorMessage = [
|
||||||
color + "CheerpX could not start" + normal,
|
color + "CheerpX无法启动" + normal,
|
||||||
"",
|
"",
|
||||||
"Check the DevTools console for more information",
|
"查看DevTools控制台了解更多信息",
|
||||||
"",
|
"",
|
||||||
"CheerpX is expected to work with recent desktop versions of Chrome, Edge, Firefox and Safari",
|
"CheerpX一般与最新的桌面版Chrome、Edge、Firefox和Safari兼容",
|
||||||
"",
|
"",
|
||||||
"Give it a try from a desktop version / another browser!",
|
"试试桌面版本或其他浏览器吧!",
|
||||||
"",
|
"",
|
||||||
"CheerpX internal error message is:",
|
"CheerpX内部错误信息是:",
|
||||||
""
|
""
|
||||||
];
|
];
|
||||||
export const unexpectedErrorMessage = [
|
export const unexpectedErrorMessage = [
|
||||||
color + "WebVM encountered an unexpected error" + normal,
|
color + "WebVM遇到意外错误" + normal,
|
||||||
"",
|
"",
|
||||||
"Check the DevTools console for further information",
|
"查看DevTools控制台以获取更多信息",
|
||||||
"",
|
"",
|
||||||
"Please consider reporting a bug!",
|
"请考虑报告bug!",
|
||||||
"",
|
"",
|
||||||
"CheerpX internal error message is:",
|
"CheerpX内部错误信息是:",
|
||||||
""
|
""
|
||||||
];
|
];
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Some ad-blockers block the plausible script from loading. Check if `plausible`
|
// Some ad-blockers block the plausible script from loading. Check if `plausible`
|
||||||
// is defined before calling it.
|
// is defined before calling it.
|
||||||
export function tryPlausible(msg) {
|
export function tryPlausible(msg) {
|
||||||
if (plausible)
|
if (self.plausible)
|
||||||
plausible(msg)
|
plausible(msg)
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import { parse } from 'node-html-parser';
|
|||||||
import { read } from '$app/server';
|
import { read } from '$app/server';
|
||||||
|
|
||||||
var posts = [
|
var posts = [
|
||||||
|
"https://labs.leaningtech.com/blog/webvm-claude",
|
||||||
"https://labs.leaningtech.com/blog/cx-10",
|
"https://labs.leaningtech.com/blog/cx-10",
|
||||||
"https://labs.leaningtech.com/blog/webvm-20",
|
"https://labs.leaningtech.com/blog/webvm-20",
|
||||||
"https://labs.leaningtech.com/blog/join-the-webvm-hackathon",
|
"https://labs.leaningtech.com/blog/join-the-webvm-hackathon",
|
||||||
|
@ -13,5 +13,5 @@ function handleProcessCreated(processCount)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<WebVM configObj={configObj} processCallback={handleProcessCreated} cacheId="blocks_terminal">
|
<WebVM configObj={configObj} processCallback={handleProcessCreated} cacheId="blocks_terminal">
|
||||||
<p>Looking for a complete desktop experience? Try the new <a class="underline" href="/alpine.html" target="_blank">Alpine Linux</a> graphical WebVM</p>
|
<p>想要完整的桌面体验? 你可以试试 <a class="underline" href="/alpine.html" target="_blank">Alpine Linux</a> 图形化WebVM(需要魔法)</p>
|
||||||
</WebVM>
|
</WebVM>
|
||||||
|
@ -13,5 +13,5 @@ function handleProcessCreated(processCount)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<WebVM configObj={configObj} processCallback={handleProcessCreated} cacheId="blocks_alpine">
|
<WebVM configObj={configObj} processCallback={handleProcessCreated} cacheId="blocks_alpine">
|
||||||
<p>Looking for something different? Try the classic <a class="underline" href="/" target="_blank">Debian Linux</a> terminal-based WebVM</p>
|
<p>返回传统的<a class="underline" href="/" target="_blank">Debian Linux</a> 终端WebVM</p>
|
||||||
</WebVM>
|
</WebVM>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user