#typescript
Codebuff is an open-source AI coding assistant that helps you edit your entire codebase using simple natural language commands. It uses multiple specialized AI agents that work together to understand your project, plan changes, make precise edits, and review them for accuracy. This multi-agent system makes Codebuff more accurate and reliable than single-model tools, improving coding speed and reducing errors. You can install it easily via npm and start giving commands like "fix SQL injection" or "add rate limiting," and it will automatically find and update the right files while running tests to ensure nothing breaks. It also lets you create custom agents and integrate AI coding help directly into your projects, boosting productivity and simplifying complex coding tasks.
https://github.com/CodebuffAI/codebuff
🚀 Вышел стабильный JavaScript движок от Google для Android
Новая стабильная библиотека Jetpack JavaScript Engine позволит разработчикам выполнять JS код в изолированной и ограниченной среде.
class MainActivity : ComponentActivity() {
// Теперь nullable, без lateinit
private var jsSandbox: JavaScriptSandbox? = null
private var jsIsolate: JavaScriptIsolate? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (!JavaScriptSandbox.isSupported()) {
Log.e("JS", "JavaScriptSandbox не поддерживается")
return
}
lifecycleScope.launch {
// Создаём и сохраняем в nullable-поле
jsSandbox = JavaScriptSandbox
.createConnectedInstanceAsync(applicationContext)
.await()
jsIsolate = jsSandbox?.createIsolate()
// При выполнении гарантируем, что jsIsolate != null
val result: String = jsIsolate
?.evaluateJavaScriptAsync(JS_SCRIPT_SCRING)
?.await()
?: "Ошибка: isolate не инициализирован"
Log.d("JS", "Результат выполнения: $result")
}
}
override fun onDestroy() {
super.onDestroy()
// Закрываем только если не null
jsIsolate?.close()
jsSandbox?.close()
}
}
#jetpack#js