-
Notifications
You must be signed in to change notification settings - Fork 877
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chore] format code and fix lint issues (#437)
This PR formats the entire repo and fixes or suppresses all lint issues by running the following commands: - `npm run format` - `npm run lint`
- Loading branch information
1 parent
0ba1548
commit 8fe80bd
Showing
61 changed files
with
1,845 additions
and
1,369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html> | ||
<script> | ||
webLLMGlobal = {} | ||
</script> | ||
<script> | ||
webLLMGlobal = {}; | ||
</script> | ||
|
||
<body> | ||
<h2>WebLLM Test Page</h2> | ||
Open console to see output | ||
</br> | ||
</br> | ||
<label id="init-label"> </label> | ||
<body> | ||
<h2>WebLLM Test Page</h2> | ||
Open console to see output | ||
<br /> | ||
<br /> | ||
<label id="init-label"> </label> | ||
|
||
<h3>Prompt</h3> | ||
<label id="prompt-label"> </label> | ||
<h3>Prompt</h3> | ||
<label id="prompt-label"> </label> | ||
|
||
<h3>Response</h3> | ||
<label id="generate-label"> </label> | ||
</br> | ||
<label id="stats-label"> </label> | ||
<h3>Response</h3> | ||
<label id="generate-label"> </label> | ||
<br /> | ||
<label id="stats-label"> </label> | ||
|
||
<script type="module" src="./cache_usage.ts"></script> | ||
|
||
</html> | ||
<script type="module" src="./cache_usage.ts"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
examples/chrome-extension-webgpu-service-worker/src/background.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
examples/chrome-extension-webgpu-service-worker/src/content.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// Only the content script is able to access the DOM | ||
chrome.runtime.onConnect.addListener(function(port) { | ||
port.onMessage.addListener(function(msg) { | ||
port.postMessage({contents: document.body.innerHTML}); | ||
}); | ||
}); | ||
chrome.runtime.onConnect.addListener(function (port) { | ||
port.onMessage.addListener(function (msg) { | ||
port.postMessage({ contents: document.body.innerHTML }); | ||
}); | ||
}); |
31 changes: 20 additions & 11 deletions
31
examples/chrome-extension-webgpu-service-worker/src/example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
In the year 2154, humanity had colonized several planets in the distant reaches of the galaxy. The planet of Xylophia-IV was one of the most remote and inhospitable, with temperatures often dropping to -200 degrees Celsius. Despite these harsh conditions, a team of scientists had established a research station on the planet to study the unique geological formations and exotic flora and fauna. | ||
|
||
One day, while conducting a routine survey of the planet's surface, the team discovered an strange object buried deep in the ice. As they examined it closer, they realized it was a small, metallic capsule with a glowing blue symbol etched onto its surface. | ||
|
||
The team's leader, a brilliant scientist named Dr. Maria Rodriguez, was immediately intrigued by the capsule's mysterious origins. She ordered her team to bring it back to the research station for further analysis. | ||
|
||
After weeks of studying the capsule, the team finally cracked the code to the symbol etched onto its surface. It was a message from an alien race, warning Earth of an impending attack from an unknown threat. | ||
|
||
The team was shocked and dismayed by the news, but they knew they had to act quickly to warn the rest of humanity. They transmitted the message to the nearest space station, which relayed it to Earth's government. | ||
|
||
As the threat of attack loomed near, the team remained on high alert, ready to face whatever dangers lay ahead. They had uncovered a secrets of the universe, and now they were determined to protect their planet and its inhabitants at all costs. | ||
In the year 2154, humanity had colonized several planets in the distant reaches | ||
of the galaxy. The planet of Xylophia-IV was one of the most remote and | ||
inhospitable, with temperatures often dropping to -200 degrees Celsius. Despite | ||
these harsh conditions, a team of scientists had established a research station | ||
on the planet to study the unique geological formations and exotic flora and | ||
fauna. One day, while conducting a routine survey of the planet's surface, the | ||
team discovered an strange object buried deep in the ice. As they examined it | ||
closer, they realized it was a small, metallic capsule with a glowing blue | ||
symbol etched onto its surface. The team's leader, a brilliant scientist named | ||
Dr. Maria Rodriguez, was immediately intrigued by the capsule's mysterious | ||
origins. She ordered her team to bring it back to the research station for | ||
further analysis. After weeks of studying the capsule, the team finally cracked | ||
the code to the symbol etched onto its surface. It was a message from an alien | ||
race, warning Earth of an impending attack from an unknown threat. The team was | ||
shocked and dismayed by the news, but they knew they had to act quickly to warn | ||
the rest of humanity. They transmitted the message to the nearest space station, | ||
which relayed it to Earth's government. As the threat of attack loomed near, the | ||
team remained on high alert, ready to face whatever dangers lay ahead. They had | ||
uncovered a secrets of the universe, and now they were determined to protect | ||
their planet and its inhabitants at all costs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.