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
<artifacts_info> | |
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity. | |
# Good artifacts are... | |
- Substantial content (>15 lines) | |
- Content that the user is likely to modify, iterate on, or take ownership of | |
- Self-contained, complex content that can be understood on its own, without context from the conversation | |
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations) | |
- Content likely to be referenced or reused multiple times |
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
// Only using native browser features (no jQuery). | |
// Uses `fetch`, `DOMParser` and `querySelectorAll`. | |
const getTitle = (url) => { | |
return fetch(url) | |
.then((response) => response.text()) | |
.then((html) => { | |
const doc = new DOMParser().parseFromString(html, "text/html"); | |
const title = doc.querySelectorAll('title')[0]; | |
return `${url}, ${title.innerText}`; |
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
gradle.taskGraph.whenReady { | |
println "rootProject: " + rootProject.name | |
println "childProjects: " + rootProject.childProjects | |
def dot = new File(rootProject.buildDir, 'project.dot') | |
dot.delete() | |
def command = "./gradlew " + gradle.startParameter.getTaskNames().join(" ") | |
println "command: " + command |